采购配置相关

20230922-ljl-fixBug
wangchaoxu 1 year ago
parent 161ef9d859
commit 84497ad497

@ -69,6 +69,9 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
@Autowired
private PurchaseSettingMapper purchaseSettingMapper;
@Autowired
private DsPurchaseSettingMapper dsPurchaseSettingMapper;
@Autowired
private ShopService shopService;
@ -562,8 +565,14 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
}
public DsPurchaseSettingBo getDsPurchaseSettingByShopId(Long shopId) {
// todo:
return null;
DsPurchaseSetting dsPurchaseSetting = dsPurchaseSettingMapper.selectByShopId(shopId);
DsPurchaseSettingBo ret = new DsPurchaseSettingBo();
return ret;
}
// public function getOrderAndPurchaseOrdersMap(String shopId, List<String> shopIds,
// List<String> orderIds,

@ -1,6 +1,7 @@
package com.ms.dal.mapper;
import com.ms.dal.entity.DsPurchaseSetting;
import com.ms.dal.entity.PurchaseSetting;
import org.apache.ibatis.annotations.Mapper;
/**
@ -21,4 +22,6 @@ public interface DsPurchaseSettingMapper {
int updateByPrimaryKey(DsPurchaseSetting record);
DsPurchaseSetting selectByShopId(Long shopId);
}

@ -42,12 +42,15 @@
select
<include refid="Base_Column_List" />
from ds_purchase_setting
where ds_purchase_setting_id = #{dsPurchaseSettingId,jdbcType=BIGINT}
where ds_purchase_setting_id = #{dsPurchaseSettingId,jdbcType=BIGINT}
</select>
<select id="selectByShopId" resultType="com.ms.dal.entity.DsPurchaseSetting">
select * from ds_purchase_setting where shop_id = #{shopId}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ds_purchase_setting
where ds_purchase_setting_id = #{dsPurchaseSettingId,jdbcType=BIGINT}
where ds_purchase_setting_id = #{dsPurchaseSettingId,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="ds_purchase_setting_id" keyProperty="dsPurchaseSettingId" parameterType="com.ms.dal.entity.DsPurchaseSetting" useGeneratedKeys="true">
insert into ds_purchase_setting
@ -181,11 +184,11 @@
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
</if>
</set>
where ds_purchase_setting_id = #{dsPurchaseSettingId,jdbcType=BIGINT}
where ds_purchase_setting_id = #{dsPurchaseSettingId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ms.dal.entity.DsPurchaseSetting">
update ds_purchase_setting
set
set
shop_id = #{shopId,jdbcType=BIGINT},
is_auto_purchase = #{isAutoPurchase,jdbcType=BOOLEAN},
gmt_is_auto_purchase = #{gmtIsAutoPurchase,jdbcType=TIMESTAMP},
@ -206,6 +209,6 @@
operate_ip = #{operateIp,jdbcType=VARCHAR},
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
where ds_purchase_setting_id = #{dsPurchaseSettingId,jdbcType=BIGINT}
where ds_purchase_setting_id = #{dsPurchaseSettingId,jdbcType=BIGINT}
</update>
</mapper>

Loading…
Cancel
Save