| @@ -0,0 +1,8 @@ | |||
| update wx_score_rules set rules = concat(SUBSTRING(rules,1,char_length(rules)-1), | |||
| ",{\"id\": 17, \"desc\": \"每日签到\", \"step\": 1, \"limit\": 1, \"score\": 0}", | |||
| ",{\"id\": 18, \"desc\": \"连续签到7天\", \"step\": 1, \"limit\": 1, \"score\": 0}", | |||
| ",{\"id\": 19, \"desc\": \"连续签到14天\", \"step\": 1, \"limit\": 1, \"score\": 0}", | |||
| ",{\"id\": 20, \"desc\": \"连续签到28天\", \"step\": 1, \"limit\": 1, \"score\": 0}", | |||
| RIGHT(rules,1)) where type = 2 | |||
| --type=2 积分规则,每日登陆去掉-- 缓存--缓存--缓存 | |||
| @@ -4,8 +4,11 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxCUserBasicSign; | |||
| import com.iformall.domain.po.WxCreditHistory; | |||
| import com.iformall.enums.EnumScoreType; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.service.WxCUserBasicSignService; | |||
| import com.iformall.service.WxCreditHistoryService; | |||
| import io.swagger.annotations.Api; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @@ -15,6 +18,9 @@ import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import java.util.HashMap; | |||
| import java.util.Map; | |||
| @RestController | |||
| @RequestMapping("/api/userSign") | |||
| @Api(description = "签到接口") | |||
| @@ -41,7 +47,8 @@ public class WxCUserBasicSignController extends BaseController { | |||
| } catch (MallinkException me) { | |||
| return new ResultData(ErrorCode.getByCode(me.getErrorCode())); | |||
| } | |||
| wxCUserBasicSign.updateTenantInfo(getTenantInfo()); | |||
| // wxCUserBasicSign.updateTenantInfo(getTenantInfo()); | |||
| wxCUserBasicSign.setTenantId(getTenantInfo().getFinalTenantId()); | |||
| wxCUserBasicSign.setUserId(memberId); | |||
| final PageInfo<WxCUserBasicSign> page = wxCUserBasicSignService.listAsPage(wxCUserBasicSign, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| @@ -50,7 +57,7 @@ public class WxCUserBasicSignController extends BaseController { | |||
| @ApiOperation("签到") | |||
| @PostMapping("signIn") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "gameId", value = "游戏ID", dataType = "String", paramType = "query", required = true)}) | |||
| @ApiImplicitParam(name = "", value = "", dataType = "", paramType = "", required = true)}) | |||
| public ResultData signIn(@RequestBody WxCUserBasicSign wxCUserBasicSign) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserBasicSignController::signIn"); | |||
| if (null == wxCUserBasicSign){ | |||
| @@ -62,7 +69,8 @@ public class WxCUserBasicSignController extends BaseController { | |||
| } catch (MallinkException me) { | |||
| return new ResultData(ErrorCode.getByCode(me.getErrorCode())); | |||
| } | |||
| wxCUserBasicSign.updateTenantInfo(getTenantInfo()); | |||
| // wxCUserBasicSign.updateTenantInfo(getTenantInfo()); | |||
| wxCUserBasicSign.setTenantId(getTenantInfo().getFinalTenantId()); | |||
| wxCUserBasicSign.setUserId(memberId); | |||
| WxCUserBasicSign todaySign = wxCUserBasicSignService.getTodaySignIn(wxCUserBasicSign); | |||
| @@ -82,4 +90,72 @@ public class WxCUserBasicSignController extends BaseController { | |||
| } | |||
| @ApiOperation("签到状态") | |||
| @GetMapping("signInStatus") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "", value = "", dataType = "", paramType = "", required = true)}) | |||
| public ResultData signInStatus() { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserBasicSignController::signIn"); | |||
| WxCUserBasicSign wxCUserBasicSign = new WxCUserBasicSign(); | |||
| Long memberId; | |||
| try { | |||
| memberId = getMemberId(); | |||
| } catch (MallinkException me) { | |||
| return new ResultData(ErrorCode.getByCode(me.getErrorCode())); | |||
| } | |||
| // wxCUserBasicSign.updateTenantInfo(getTenantInfo()); | |||
| wxCUserBasicSign.setTenantId(getTenantInfo().getFinalTenantId()); | |||
| wxCUserBasicSign.setUserId(memberId); | |||
| Map<String, Integer> map = wxCUserBasicSignService.getLastSignIn(wxCUserBasicSign); | |||
| return new ResultData(map); | |||
| } | |||
| @ApiOperation("签到领取") | |||
| @PostMapping("signInCredit") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "", value = "", dataType = "", paramType = "", required = true)}) | |||
| public ResultData signInCredit(@RequestBody WxCreditHistory wxCreditHistory) { | |||
| logger.debug("[" + getIpAddr() + "] WxCUserBasicSignController::signIn"); | |||
| if (null == wxCreditHistory){ | |||
| wxCreditHistory = new WxCreditHistory(); | |||
| } | |||
| Long memberId; | |||
| try { | |||
| memberId = getMemberId(); | |||
| } catch (MallinkException me) { | |||
| return new ResultData(ErrorCode.getByCode(me.getErrorCode())); | |||
| } | |||
| WxCUserBasicSign wxCUserBasicSign = new WxCUserBasicSign(); | |||
| wxCUserBasicSign.setTenantId(getFinalTenantId()); | |||
| wxCUserBasicSign.setUserId(memberId); | |||
| Map<String, Integer> map = wxCUserBasicSignService.getLastSignIn(wxCUserBasicSign); | |||
| int continueMonthSign = map.get("continueMonthSign");//本月连续签到天数 | |||
| int signInSevenDay = map.get("signInSevenDay");//7日连续奖励 | |||
| int signInFTDay = map.get("signInFTDay");//14日连续奖励 | |||
| int signInTEDay = map.get("signInTEDay");//28日连续奖励 | |||
| if(wxCreditHistory.getCreditType().equals(EnumScoreType.SIGN_IN_SEVENDAY.getCode())){ | |||
| if(continueMonthSign >= 7 && signInSevenDay == 0){ | |||
| wxCUserBasicSignService.signInCreditHistory(wxCUserBasicSign,EnumScoreType.SIGN_IN_SEVENDAY); | |||
| return new ResultData(); | |||
| } | |||
| return new ResultData(ErrorCode.MEM_MONTH_IS_USED); | |||
| }else if(wxCreditHistory.getCreditType().equals(EnumScoreType.SIGN_IN_FTDAY.getCode())){ | |||
| if(continueMonthSign >= 14 && signInFTDay == 0){ | |||
| wxCUserBasicSignService.signInCreditHistory(wxCUserBasicSign,EnumScoreType.SIGN_IN_FTDAY); | |||
| return new ResultData(); | |||
| } | |||
| return new ResultData(ErrorCode.MEM_MONTH_IS_USED); | |||
| }else if(wxCreditHistory.getCreditType().equals(EnumScoreType.SIGN_IN_TEDAY.getCode())){ | |||
| if(continueMonthSign >= 28 && signInTEDay == 0){ | |||
| wxCUserBasicSignService.signInCreditHistory(wxCUserBasicSign,EnumScoreType.SIGN_IN_TEDAY); | |||
| return new ResultData(); | |||
| } | |||
| return new ResultData(ErrorCode.MEM_MONTH_IS_USED); | |||
| }else{ | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR,"creditType"); | |||
| } | |||
| } | |||
| } | |||
| @@ -1014,7 +1014,7 @@ public class WxUserGrantController extends BaseController { | |||
| wxCUserBasicInfoService.updateQrCode(wxCUserBasicInfo); | |||
| } | |||
| } | |||
| RedisCacheUtils.cache(objectCommonRedisTemplate, key, qrCode, Constant.S_D_EXPIRE); | |||
| RedisCacheUtils.cache(objectCommonRedisTemplate, key, qrCode, 0); | |||
| } catch (Exception e) { | |||
| logger.error("getUserinfoQrCode error.",e); | |||
| @@ -397,6 +397,7 @@ public enum ErrorCode{ | |||
| USER_NOT_MEMBER(13102, "该用户不是小程序会员"), | |||
| OUT_OF_CREDIT(13103, "超出最大积分"), | |||
| MEM_IS_SIGNIN(13104, "该用户已签到"), | |||
| MEM_MONTH_IS_USED(13105, "该用户本月已领取或未到领取条件"), | |||
| /** | |||
| @@ -55,7 +55,7 @@ public class WxScoreRules extends BaseTenantEntity { | |||
| @TableField(exist = false) | |||
| private static final String creditDefaultRules = | |||
| "[" + | |||
| "{\"id\":1,\"limit\":0,\"step\":1,\"score\":0 ,\"desc\":\"每日登陆\"}," + | |||
| // "{\"id\":1,\"limit\":0,\"step\":1,\"score\":0 ,\"desc\":\"每日登陆\"}," + | |||
| "{\"id\":2,\"childs\":[" + | |||
| " {\"businessId\":1,\"limit\":0,\"step\":1,\"score\":0 ,\"desc\":\"线上交易1元\"}," + | |||
| " {\"businessId\":2,\"limit\":0,\"step\":1,\"score\":0 ,\"desc\":\"线上交易1元\"}," + | |||
| @@ -71,7 +71,11 @@ public class WxScoreRules extends BaseTenantEntity { | |||
| "]}," + | |||
| "{\"id\":3,\"limit\":1,\"step\":1,\"score\":0,\"desc\":\"绑定车牌1个\"}," + | |||
| "{\"id\":6,\"limit\":1,\"step\":1,\"score\":0,\"desc\":\"授权手机号\"}," + | |||
| "{\"id\":7,\"limit\":1,\"step\":1,\"score\":0,\"desc\":\"编辑个人信息\"}" + | |||
| "{\"id\":7,\"limit\":1,\"step\":1,\"score\":0,\"desc\":\"编辑个人信息\"}," + | |||
| "{\"id\": 17, \"desc\": \"每日签到\", \"step\": 1, \"limit\": 1, \"score\": 0},"+ | |||
| "{\"id\": 18, \"desc\": \"连续签到7天\", \"step\": 1, \"limit\": 1, \"score\": 0},"+ | |||
| "{\"id\": 19, \"desc\": \"连续签到14天\", \"step\": 1, \"limit\": 1, \"score\": 0},"+ | |||
| "{\"id\": 20, \"desc\": \"连续签到28天\", \"step\": 1, \"limit\": 1, \"score\": 0},"+ | |||
| "]"; | |||
| @TableField(exist = false) | |||
| @@ -20,7 +20,12 @@ public enum EnumScoreType { | |||
| ACTIVITY_JOIN(13, "活动报名"), | |||
| CLEAN_CREDIT(14, "积分清零计划"), | |||
| GAME_LES_CREDIT(15, "游戏消耗积分"), | |||
| GAME_ADD_CREDIT(16, "游戏奖励积分"),; | |||
| GAME_ADD_CREDIT(16, "游戏奖励积分"), | |||
| SIGN_IN_DAY(17, "每日签到"), | |||
| SIGN_IN_SEVENDAY(18, "连续签到7天"), | |||
| SIGN_IN_FTDAY(19, "连续签到14天"), | |||
| SIGN_IN_TEDAY(20, "连续签到28天"),; | |||
| public static EnumScoreType getEnum(Integer code) { | |||
| for (EnumScoreType value : values()) { | |||
| @@ -41,4 +41,6 @@ public interface WxCreditHistoryMapper extends CommonMapper<WxCreditHistory, Lon | |||
| Integer getLesCreditSummary(WxCreditHistory wxCreditHistory); | |||
| List<MerchantCreditRankingVo> merchantCreditRanking(WxCreditHistory record); | |||
| int monthCount(WxCreditHistory record); | |||
| } | |||
| @@ -2,6 +2,9 @@ package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxCUserBasicSign; | |||
| import com.iformall.enums.EnumScoreType; | |||
| import java.util.Map; | |||
| public interface WxCUserBasicSignService { | |||
| @@ -19,5 +22,7 @@ public interface WxCUserBasicSignService { | |||
| WxCUserBasicSign getTodaySignIn(WxCUserBasicSign record); | |||
| WxCUserBasicSign getLastSignIn(WxCUserBasicSign record); | |||
| Map<String,Integer> getLastSignIn(WxCUserBasicSign record); | |||
| void signInCreditHistory(WxCUserBasicSign record, EnumScoreType enumScoreType); | |||
| } | |||
| @@ -85,4 +85,5 @@ public interface WxCreditHistoryService { | |||
| Integer getLesCreditSummary(WxCreditHistory wxCreditHistory); | |||
| PageInfo<MerchantCreditRankingVo> listAsPageMcrv(WxCreditHistory record, Integer pageIndex, Integer pageSize); | |||
| } | |||
| @@ -4,8 +4,13 @@ import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.domain.po.WxCUserBasicSign; | |||
| import com.iformall.domain.po.WxCreditHistory; | |||
| import com.iformall.enums.EnumScoreType; | |||
| import com.iformall.enums.EnumUserType; | |||
| import com.iformall.mapper.WxCUserBasicSignMapper; | |||
| import com.iformall.mapper.WxCreditHistoryMapper; | |||
| import com.iformall.service.WxCUserBasicSignService; | |||
| import com.iformall.service.WxCreditHistoryService; | |||
| import com.iformall.utils.DateUtils; | |||
| import lombok.extern.slf4j.Slf4j; | |||
| import org.slf4j.Logger; | |||
| @@ -16,9 +21,7 @@ import org.springframework.transaction.annotation.Transactional; | |||
| import java.text.DateFormat; | |||
| import java.text.SimpleDateFormat; | |||
| import java.util.Calendar; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| import java.util.*; | |||
| import static java.util.Calendar.DAY_OF_MONTH; | |||
| @@ -31,6 +34,12 @@ public class WxCUserBasicSignServiceImpl implements WxCUserBasicSignService { | |||
| @Autowired | |||
| WxCUserBasicSignMapper wxCUserBasicSignMapper; | |||
| @Autowired | |||
| WxCreditHistoryService wxCreditHistoryService; | |||
| @Autowired | |||
| WxCreditHistoryMapper wxCreditHistoryMapper; | |||
| @Override | |||
| public PageInfo<WxCUserBasicSign> listAsPage(WxCUserBasicSign record, Integer pageIndex, Integer pageSize) { | |||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCUserBasicSignMapper.findList(record)); | |||
| @@ -65,6 +74,9 @@ public class WxCUserBasicSignServiceImpl implements WxCUserBasicSignService { | |||
| }else{ | |||
| long daysL = DateUtils.startToEnd(lastSignIn.getSigninDate(), today); | |||
| int daysI = new Long(daysL).intValue(); | |||
| if(daysI == 0){ | |||
| return lastSignIn; | |||
| } | |||
| record.setCountSign(lastSignIn.getCountSign() + 1); | |||
| if(daysI == 1){ | |||
| @@ -99,6 +111,7 @@ public class WxCUserBasicSignServiceImpl implements WxCUserBasicSignService { | |||
| } | |||
| wxCUserBasicSignMapper.insert(record); | |||
| } | |||
| signInCreditHistory(record,EnumScoreType.SIGN_IN_DAY); | |||
| return record; | |||
| }else{ | |||
| //补签 | |||
| @@ -132,9 +145,60 @@ public class WxCUserBasicSignServiceImpl implements WxCUserBasicSignService { | |||
| } | |||
| @Override | |||
| public WxCUserBasicSign getLastSignIn(WxCUserBasicSign record) { | |||
| return wxCUserBasicSignMapper.getLastSignIn(record); | |||
| public Map<String,Integer> getLastSignIn(WxCUserBasicSign record) { | |||
| Map<String,Integer> map = new HashMap<>(); | |||
| WxCUserBasicSign lastSignIn = wxCUserBasicSignMapper.getLastSignIn(record); | |||
| if(lastSignIn != null && DateUtils.isSameMonth(lastSignIn.getSigninDate(),new Date())){ | |||
| //本月连续签到天数 | |||
| map.put("continueMonthSign",lastSignIn.getContinueMonthSign()); | |||
| }else{ | |||
| map.put("continueMonthSign",0); | |||
| } | |||
| WxCreditHistory wxCreditHistory = new WxCreditHistory(); | |||
| wxCreditHistory.setTenantId(record.getFinalTenantId()); | |||
| wxCreditHistory.setCUserId(record.getUserId()); | |||
| wxCreditHistory.setCreditType(EnumScoreType.SIGN_IN_DAY.getCode()); | |||
| //每日签到 | |||
| if(wxCreditHistoryMapper.loginCount(wxCreditHistory) > 0){ | |||
| map.put("signInDay",1); | |||
| }else{ | |||
| map.put("signInDay",0); | |||
| } | |||
| //7日连续 | |||
| wxCreditHistory.setCreditType(EnumScoreType.SIGN_IN_SEVENDAY.getCode()); | |||
| if(wxCreditHistoryMapper.monthCount(wxCreditHistory) > 0 ){ | |||
| map.put("signInSevenDay",1); | |||
| }else{ | |||
| map.put("signInSevenDay",0); | |||
| } | |||
| //14日连续 | |||
| wxCreditHistory.setCreditType(EnumScoreType.SIGN_IN_FTDAY.getCode()); | |||
| if(wxCreditHistoryMapper.monthCount(wxCreditHistory) > 0 ){ | |||
| map.put("signInFTDay",1); | |||
| }else{ | |||
| map.put("signInFTDay",0); | |||
| } | |||
| //28日连续 | |||
| wxCreditHistory.setCreditType(EnumScoreType.SIGN_IN_TEDAY.getCode()); | |||
| if(wxCreditHistoryMapper.monthCount(wxCreditHistory) > 0 ){ | |||
| map.put("signInTEDay",1); | |||
| }else{ | |||
| map.put("signInTEDay",0); | |||
| } | |||
| return map; | |||
| } | |||
| @Override | |||
| public void signInCreditHistory(WxCUserBasicSign record, EnumScoreType enumScoreType){ | |||
| WxCreditHistory wxCreditHistory = new WxCreditHistory(); | |||
| wxCreditHistory.setCUserId(record.getUserId()); | |||
| wxCreditHistory.setTenantId(record.getFinalTenantId()); | |||
| wxCreditHistory.setCreateDate(new Date()); | |||
| wxCreditHistory.setCreditType(enumScoreType.getCode()); | |||
| wxCreditHistory.setChangePurpose(enumScoreType.getMessage()); | |||
| wxCreditHistory.setOperatorType(EnumUserType.CUSERBASIC.getCode()); | |||
| wxCreditHistory.setOperatorId(record.getUserId()); | |||
| wxCreditHistoryService.saveOrUpdate(wxCreditHistory,null); | |||
| } | |||
| } | |||
| @@ -273,14 +273,14 @@ public class WxCUserServiceImpl implements WxCUserService { | |||
| logger.error("c_user 成长值 " + e.getMessage()); | |||
| } | |||
| // 积分 | |||
| try { | |||
| credit = addCredit(user, EnumScoreType.LOGIN); | |||
| logger.info("user_id:" + user.getId() + " 登录新增积分:" + credit); | |||
| } catch (MallinkException e) { | |||
| logger.error("c_user 积分 " + e.getMessage()); | |||
| } catch (Exception e) { | |||
| logger.error("c_user 积分 " + e.getMessage()); | |||
| } | |||
| // try { | |||
| // credit = addCredit(user, EnumScoreType.LOGIN); | |||
| // logger.info("user_id:" + user.getId() + " 登录新增积分:" + credit); | |||
| // } catch (MallinkException e) { | |||
| // logger.error("c_user 积分 " + e.getMessage()); | |||
| // } catch (Exception e) { | |||
| // logger.error("c_user 积分 " + e.getMessage()); | |||
| // } | |||
| // 用户登陆后 更新最后一次活跃时间 | |||
| if (user.getUserId() != null) { | |||
| @@ -391,7 +391,8 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService { | |||
| private int creditIncrement(WxCreditHistory record) { | |||
| //查找C端用户的成长值 | |||
| if (record.getCreditType() == EnumScoreType.LOGIN.getCode()) { | |||
| return loginAddCredit(record); | |||
| // return loginAddCredit(record);//登陆加积分取消 | |||
| return 0; | |||
| } | |||
| if (record.getCreditType() == EnumScoreType.BIND_CAR.getCode()) { | |||
| return bindCarAddCredit(record); | |||
| @@ -430,6 +431,19 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService { | |||
| return record.getCreditNum(); | |||
| } | |||
| if (record.getCreditType() == EnumScoreType.SIGN_IN_DAY.getCode()) { | |||
| return signinCredit(record); | |||
| } | |||
| if (record.getCreditType() == EnumScoreType.SIGN_IN_SEVENDAY.getCode()) { | |||
| return signinMonthCredit(record,EnumScoreType.SIGN_IN_SEVENDAY); | |||
| } | |||
| if (record.getCreditType() == EnumScoreType.SIGN_IN_FTDAY.getCode()) { | |||
| return signinMonthCredit(record,EnumScoreType.SIGN_IN_FTDAY); | |||
| } | |||
| if (record.getCreditType() == EnumScoreType.SIGN_IN_TEDAY.getCode()) { | |||
| return signinMonthCredit(record,EnumScoreType.SIGN_IN_TEDAY); | |||
| } | |||
| return 0; | |||
| } | |||
| @@ -449,6 +463,28 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService { | |||
| return wxScoreRules.getRule(EnumScoreType.LOGIN, WxScoreRules.SCORE); | |||
| } | |||
| private int signinCredit(WxCreditHistory record) { | |||
| //如果当天已经登录过则跳过 | |||
| if (wxCreditHistoryMapper.loginCount(record) > 0) { | |||
| return 0; | |||
| } | |||
| // 1. 获取当前租户下积分的增加规则 | |||
| WxScoreRules wxScoreRules = wxScoreRulesService.getCreditRules(record.getTenantId()); | |||
| // 2. 增长的积分 | |||
| return wxScoreRules.getRule(EnumScoreType.SIGN_IN_DAY, WxScoreRules.SCORE); | |||
| } | |||
| private int signinMonthCredit(WxCreditHistory record,EnumScoreType enumScoreType) { | |||
| // | |||
| if (wxCreditHistoryMapper.monthCount(record) > 0) { | |||
| return 0; | |||
| } | |||
| // 1. 获取当前租户下积分的增加规则 | |||
| WxScoreRules wxScoreRules = wxScoreRulesService.getCreditRules(record.getTenantId()); | |||
| // 2. 增长的积分 | |||
| return wxScoreRules.getRule(enumScoreType, WxScoreRules.SCORE); | |||
| } | |||
| private int bindCarAddCredit(WxCreditHistory record) { | |||
| if (wxCreditHistoryMapper.countList(record) > 0) { | |||
| return 0; | |||
| @@ -184,6 +184,18 @@ | |||
| and DATEDIFF(`create_date`,now())=0 | |||
| </select> | |||
| <select id="monthCount" parameterType="com.iformall.domain.po.WxCreditHistory" resultType="java.lang.Integer"> | |||
| select COUNT(0) from wx_credit_history | |||
| where 1=1 | |||
| <if test=" null != cUserId "> | |||
| and `c_user_id` = #{cUserId} | |||
| </if> | |||
| <if test=" null != creditType "> | |||
| and `credit_type` = #{creditType} | |||
| </if> | |||
| and DATE_FORMAT(`create_date`,'%Y%m') = DATE_FORMAT(CURDATE(),'%Y%m'); | |||
| </select> | |||
| <select id="countTodayList" parameterType="com.iformall.domain.po.WxCreditHistory" resultType="java.lang.Integer"> | |||
| select count(0) | |||
| from wx_credit_history | |||