湿料计划(查询优化)

highway
wws 1 year ago
parent e38a563f81
commit 30ac787aa4

@ -5,6 +5,7 @@ public class BaseProduct {
private String productId;
private String productCode;
private String productDescZh;
private String mtart;
@Override
public String toString() {
@ -12,6 +13,7 @@ public class BaseProduct {
"productId='" + productId + '\'' +
", productCode='" + productCode + '\'' +
", productDescZh='" + productDescZh + '\'' +
", mtart='" + mtart + '\'' +
'}';
}
@ -39,6 +41,14 @@ public class BaseProduct {
this.productDescZh = productDescZh;
}
public String getMtart() {
return mtart;
}
public void setMtart(String mtart) {
this.mtart = mtart;
}
public BaseProduct() {
}
}

@ -115,23 +115,23 @@ public class ProWhiteOrderServiceImpl implements IProWhiteOrderService {
proOrder.setProdDesc("");
proWhiteOrderMapper.insertProOrder(proOrder);
System.out.println("源code---->"+proOrder.getProdCode());
System.out.println("源desc---->"+proOrder.getProdDesc());
System.out.println("code---------->");
for (String code : prodCodes) {
System.out.println(code);
}
System.out.println("desc----------->");
for (String desc : prodDescs) {
System.out.println(desc);
}
System.out.println("这里是母订单信息");
System.out.println("母订单code"+proOrder.getOrderCode());
System.out.println("这里是子订单信息");
// System.out.println("源code---->"+proOrder.getProdCode());
// System.out.println("源desc---->"+proOrder.getProdDesc());
//
// System.out.println("code---------->");
// for (String code : prodCodes) {
// System.out.println(code);
// }
// System.out.println("desc----------->");
// for (String desc : prodDescs) {
// System.out.println(desc);
// }
//
// System.out.println("这里是母订单信息");
// System.out.println("母订单code"+proOrder.getOrderCode());
//
//
// System.out.println("这里是子订单信息");
// 设置子订单信息
for (int i = 0; i< prodCodes.length; i++){
@ -159,8 +159,8 @@ public class ProWhiteOrderServiceImpl implements IProWhiteOrderService {
// 将子订单插入数据库
proWhiteOrderMapper.insertProOrder(childProOrder);
System.out.println("子订单code"+i+childProOrder.getOrderCode());
System.out.println("子订单parentCode"+i+childProOrder.getParentOrder());
// System.out.println("子订单code"+i+childProOrder.getOrderCode());
// System.out.println("子订单parentCode"+i+childProOrder.getParentOrder());
}
return 1;

@ -8,17 +8,19 @@
<result property="productCode" column="product_code" />
<result property="productId" column="product_id" />
<result property="productDescZh" column="product_desc_zh" />
<result property="mtart" column="mtart" />
</resultMap>
<sql id="selectBaseProductVo">
select product_id,product_code, product_desc_zh from base_product
select product_id,product_code, product_desc_zh,mtart from base_product
</sql>
<select id="selectBaseProductList" parameterType="BaseProduct" resultMap="BaseProductResult">
<include refid="selectBaseProductVo"/>
<where>
<if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if>
<if test="mtart != null and mtart != ''"> and mtart = #{mtart}</if>
<if test="productDescZh != null and productDescZh != ''"> and product_desc_zh like concat('%', #{productDescZh}, '%')</if>
</where>
</select>

Loading…
Cancel
Save