Просмотр исходного кода

Merge branch 'release_real_202101' of https://git.malls.iformall.com/server/formallProject into release_real_202101

release_toaliyun_real
xiaohanzi 5 лет назад
Родитель
Сommit
eed84d8dec
3 измененных файлов: 17 добавлений и 7 удалений
  1. +13
    -4
      mallinkCApi/src/main/java/com/iformall/controller/WxCreditHistoryController.java
  2. +2
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicSignServiceImpl.java
  3. +2
    -2
      mallinkService/src/main/resources/mapper/WxCUserBasicSignMapper.xml

+ 13
- 4
mallinkCApi/src/main/java/com/iformall/controller/WxCreditHistoryController.java Просмотреть файл

@@ -4,15 +4,13 @@ import com.github.pagehelper.PageInfo;
import com.iformall.common.ErrorCode;
import com.iformall.common.Result;
import com.iformall.common.ResultData;
import com.iformall.domain.po.MallUserInfo;
import com.iformall.domain.po.WxCUser;
import com.iformall.domain.po.WxMerchant;
import com.iformall.domain.po.*;
import com.iformall.domain.po.base.BaseEntity;
import com.iformall.domain.po.WxCreditHistory;
import com.iformall.enums.EnumScoreType;
import com.iformall.enums.EnumUserType;
import com.iformall.exception.MallinkException;
import com.iformall.service.WxCreditHistoryService;
import com.iformall.service.WxScoreRulesService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@@ -35,6 +33,9 @@ public class WxCreditHistoryController extends BaseController{
@Autowired
private WxCreditHistoryService wxCreditHistoryService;

@Autowired
private WxScoreRulesService wxScoreRulesService;

@ApiOperation("用户积分列表")
@GetMapping("list")
@ApiImplicitParams({
@@ -92,4 +93,12 @@ public class WxCreditHistoryController extends BaseController{
}
}

@ApiOperation("积分配置")
@GetMapping("/credit_rules")
public ResultData creditRulesList() {
logger.debug("[" + getIpAddr() + "] creditRulesList::list");
WxScoreRules scoreRules = wxScoreRulesService.getCreditRules(getTenantInfo().getFinalTenantId());
return new ResultData(scoreRules);
}

}

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

@@ -18,6 +18,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.text.DateFormat;
@@ -46,7 +47,7 @@ public class WxCUserBasicSignServiceImpl implements WxCUserBasicSignService {
return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCUserBasicSignMapper.findList(record));
}

@Transactional(rollbackFor = {Exception.class})
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = {Exception.class})
@Override
public WxCUserBasicSign signIn(WxCUserBasicSign record) {
if(record.getType() == null){


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

@@ -74,7 +74,7 @@
</select>

<select id="getLastSignIn" parameterType="com.iformall.domain.po.WxCUserBasicSign" resultMap="BaseResultMap">
select <include refid="allColumns" />,max(`signin_date`) from wx_c_user_basic_sign
select <include refid="allColumns" /> from wx_c_user_basic_sign
where 1 = 1
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
@@ -85,7 +85,7 @@
<if test=" null != userId ">
and `user_id` = #{userId}
</if>
group by user_id
order by `signin_date` desc limit 1
</select>

</mapper>

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