xhxu 5 лет назад
Родитель
Сommit
b5ecd5f332
2 измененных файлов: 7 добавлений и 4 удалений
  1. +3
    -3
      mallinkService/src/main/java/com/iformall/service/tt/impl/TtCouponServiceImpl.java
  2. +4
    -1
      mallinkService/src/main/resources/mapper/TtCouponMapper.xml

+ 3
- 3
mallinkService/src/main/java/com/iformall/service/tt/impl/TtCouponServiceImpl.java Просмотреть файл

@@ -123,9 +123,9 @@ public class TtCouponServiceImpl implements TtCouponService {
if(byId == null){ if(byId == null){
return byId; return byId;
} }
WxMerchant author = wxMerchantService.getById(byId.getMerchantId());
byId.setMerchantName(author.getName());
byId.setMerchantPic(author.getImgUrl());
// WxMerchant author = wxMerchantService.getById(byId.getMerchantId());
// byId.setMerchantName(author.getName());
// byId.setMerchantPic(author.getImgUrl());
// byId.setAuthor(wxMerchantService.getById(byId.getMerchantId())); // byId.setAuthor(wxMerchantService.getById(byId.getMerchantId()));
if(byId.getType().equals(EnumTtCouponType.COUPON_COLUMN.getCode())){ if(byId.getType().equals(EnumTtCouponType.COUPON_COLUMN.getCode())){
TtCoupon couponQ = new TtCoupon(); TtCoupon couponQ = new TtCoupon();


+ 4
- 1
mallinkService/src/main/resources/mapper/TtCouponMapper.xml Просмотреть файл

@@ -129,7 +129,10 @@
</select> </select>


<select id="selectById" parameterType="Long" resultMap="BaseResultMap"> <select id="selectById" parameterType="Long" resultMap="BaseResultMap">
select <include refid="allColumns"/> from tt_coupon where id = #{id}
select <include refid="allColumns"/>
from tt_coupon c
left join wx_merchant m on m.id = c.merchant_id
where c.id = #{id}
</select> </select>
<delete id="deleteById" parameterType="Long"> <delete id="deleteById" parameterType="Long">


Загрузка…
Отмена
Сохранить