src/main/java/cn/pzhu/pserson/dao/provider/HealthyDynaSqlProvider.java
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package cn.pzhu.pserson.dao.provider;
import cn.pzhu.pserson.domain.Healthy;
import org.apache.ibatis.jdbc.SQL;
import static cn.pzhu.pserson.util.Constants.HEALTHYTABLE;
public class HealthyDynaSqlProvider {
// 动态插入
public String insert_HealthyInfo(Healthy healthy){
return new SQL(){
{
INSERT_INTO(HEALTHYTABLE);
if(healthy.getCity()!=null){
VALUES("city","#{city}");
}
if(healthy.getIsHighCity()!=null){
VALUES("is_high_city","#{isHighCity}");
}
if(healthy.getIsContactPeople()!=null){
VALUES("is_contact_people","#{isContactPeople}");
}
if(healthy.getTemperature()!=null){
VALUES("temperature","#{temperature}");
}
if(healthy.getCreatedate()!=null){
VALUES("createdate","#{createdate}");
}
if(healthy.getUserId()!=null){
VALUES("user_id","#{userId}");
}
}
}.toString();
}
// 动态更新
public String update_HealthyInfo(Healthy healthy){
return new SQL(){
{
UPDATE(HEALTHYTABLE);
if(healthy.getCity() != null ){
SET("city = #{city}");
}
if(healthy.getIsHighCity()!=null){
SET("is_high_city = #{isHighCity}");
}
if(healthy.getIsContactPeople()!=null){
SET("is_contact_people = #{isContactPeople}");
}
if(healthy.getTemperature()!=null){
SET("temperature = #{temperature}");
}
if(healthy.getCreatedate()!=null){
SET("createdate = #{createdate}");
}
if(healthy.getUserId()!=null){
SET("user_id = #{userId}");
}
后面还有 5 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。