src/main/java/cn/pzhu/pserson/dao/provider/LogisticDynaSqlProvider.java

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

package cn.pzhu.pserson.dao.provider;


import cn.pzhu.pserson.domain.Logistic;
import cn.pzhu.pserson.domain.User;
import org.apache.ibatis.jdbc.SQL;

import static cn.pzhu.pserson.util.Constants.LOGISTICTABLE;

public class LogisticDynaSqlProvider {
			// 动态插入
			public String insert_LogisticInfo(Logistic logistic){
				
				return new SQL(){
					{
						INSERT_INTO(LOGISTICTABLE);
						if(logistic.getProductName() != null ){
							VALUES("product_name", "#{productName}");
						}
						if(logistic.getDonorName()!=null){
							VALUES("donor_name","#{donorName}");
						}
						if(logistic.getDonorPhone()!=null){
							VALUES("donor_phone","#{donorPhone}");
						}
						if(logistic.getProductCount()!=null){
							VALUES("product_count","#{productCount}");
						}
						if(logistic.getUnit()!=null){
							VALUES("unit","#{unit}");
						}
						if(logistic.getLogisticId()!=null){
							VALUES("logistic_id","#{logisticId}");
						}
						if(logistic.getCreatedate()!=null){
							VALUES("createdate","#{createdate}");
						}
						if(logistic.getStatus()!=null){
							VALUES("status","#{status}");
						}
						if(logistic.getUserId()!=null){
							VALUES("user_id","#{userId}");
						}
						if(logistic.getProductCountSave()!=null){
							VALUES("product_count_save","#{productCountSave}");
						}
						if(logistic.getNoticeId()!=null){
							VALUES("notice_id","#{noticeId}");
						}
					}
				}.toString();
			}	
			// 动态更新
			public String update_LogisticInfo(Logistic logistic){
				
				return new SQL(){
					{
						UPDATE(LOGISTICTABLE);
						if(logistic.getProductName() != null ){
							SET("product_name = #{productName}");
后面还有 36 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。