| @@ -3,9 +3,9 @@ CREATE TABLE `wx_third_party_api` ( | |||
| `tenant_id` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '租户ID', | |||
| `parent_tenant_id` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '父租户ID', | |||
| `type` tinyint(6) NOT NULL DEFAULT 1 COMMENT '第三方类型,', | |||
| `app_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, | |||
| `app_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, | |||
| `sign_key` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '加密key,', | |||
| `app_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, | |||
| `app_key` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, | |||
| `sign_key` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '加密key,', | |||
| `api_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, | |||
| `token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, | |||
| `token_expired_time` datetime(0) DEFAULT NULL COMMENT 'token过期时间', | |||
| @@ -1,4 +1,4 @@ | |||
| package com.iformall.domain.po; | |||
| package com.iformall.domain.po.tt; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| @@ -1,4 +1,4 @@ | |||
| package com.iformall.domain.po; | |||
| package com.iformall.domain.po.tt; | |||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| @@ -138,8 +138,7 @@ public class TtMaServiceImpl implements TtMaService, RequestHttp<CloseableHttpCl | |||
| Map<String, String> params = new HashMap<>(8); | |||
| params.put("appid", config.getAppid()); | |||
| params.put("secret", config.getSecret()); | |||
| params.put("js_code", jsCode); | |||
| params.put("grant_type", "authorization_code"); | |||
| params.put("code", jsCode); | |||
| String result = get(JSCODE_TO_SESSION_URL, Joiner.on("&").withKeyValueSeparator("=").join(params)); | |||
| return WxMaJscode2SessionResult.fromJson(result); | |||
| @@ -2,7 +2,7 @@ package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.dto.WxCUserBasicInfoDto; | |||
| import com.iformall.domain.po.TtCUser; | |||
| import com.iformall.domain.po.tt.TtCUser; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.vo.UserCountVo; | |||
| import org.apache.ibatis.annotations.Param; | |||
| @@ -1,7 +1,7 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.TtCoupon; | |||
| import com.iformall.domain.po.tt.TtCoupon; | |||
| import org.apache.ibatis.annotations.Param; | |||
| import java.util.List; | |||
| @@ -35,4 +35,32 @@ public interface TtCouponMapper extends CommonMapper<TtCoupon, Long> { | |||
| */ | |||
| int reduceSellCount(Long id); | |||
| /** | |||
| * 评价数+1 | |||
| * @param id | |||
| * @return | |||
| */ | |||
| int addAssessCount(Long id); | |||
| /** | |||
| * 收藏数+1 | |||
| * @param id | |||
| * @return | |||
| */ | |||
| int addCollectCount(Long id); | |||
| /** | |||
| * 收藏数-1 | |||
| * @param id | |||
| * @return | |||
| */ | |||
| int reduceCollectCount(Long id); | |||
| /** | |||
| * 人气+n | |||
| * @param id | |||
| * @return | |||
| */ | |||
| int addPopularity(@Param("id")Long id,@Param("popularity")Integer popularity); | |||
| } | |||
| @@ -2,12 +2,10 @@ package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.dto.WxCUserBasicInfoDto; | |||
| import com.iformall.domain.po.TtCUser; | |||
| import com.iformall.domain.po.WxAuthorizerInfo; | |||
| import com.iformall.domain.po.tt.TtCUser; | |||
| import com.iformall.domain.po.WxCUserFrom; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.vo.UserCountVo; | |||
| import me.chanjar.weixin.mp.bean.result.WxMpUser; | |||
| import java.util.List; | |||
| @@ -1,12 +1,10 @@ | |||
| package com.iformall.service.cuser.tt; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.domain.po.TtCUser; | |||
| import com.iformall.domain.po.WxCUser; | |||
| import com.iformall.domain.po.tt.TtCUser; | |||
| import com.iformall.domain.po.base.BaseCUserEntity; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.mapper.TtCUserMapper; | |||
| import com.iformall.mapper.WxCUserMapper; | |||
| import com.iformall.service.cuser.CUserServiceApapter; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| @@ -5,7 +5,7 @@ import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.domain.dto.WxCUserBasicInfoDto; | |||
| import com.iformall.domain.po.TtCUser; | |||
| import com.iformall.domain.po.tt.TtCUser; | |||
| import com.iformall.domain.po.WxCUserBasicInfo; | |||
| import com.iformall.domain.po.WxCUserFrom; | |||
| import com.iformall.domain.po.base.BaseCUserEntity; | |||
| @@ -0,0 +1,41 @@ | |||
| package com.iformall.service.tt; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.tt.TtCoupon; | |||
| public interface TtCouponService { | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| * @param record | |||
| * @param pageIndex | |||
| * @param pageSize | |||
| * @return | |||
| */ | |||
| PageInfo<TtCoupon> listAsPage(TtCoupon record, Integer pageIndex, Integer pageSize); | |||
| /** | |||
| * 根据Id获得实体 | |||
| * | |||
| * @param id | |||
| * @return | |||
| */ | |||
| TtCoupon getById(Long id); | |||
| /** | |||
| * 保存或更新实体 | |||
| * | |||
| * @param record | |||
| */ | |||
| ResultData saveOrUpdate(TtCoupon record); | |||
| /** | |||
| * 根据Id删除实体 | |||
| * | |||
| * @param id | |||
| */ | |||
| void deleteById(Long id); | |||
| } | |||
| @@ -0,0 +1,81 @@ | |||
| package com.iformall.service.tt.impl; | |||
| import com.alibaba.fastjson.JSONArray; | |||
| import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.tt.TtCoupon; | |||
| import com.iformall.mapper.*; | |||
| import com.iformall.service.tt.TtCouponService; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import java.math.BigDecimal; | |||
| import java.util.*; | |||
| @Service | |||
| public class TtCouponServiceImpl implements TtCouponService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| TtCouponMapper ttCouponMapper; | |||
| @Override | |||
| public PageInfo<TtCoupon> listAsPage(TtCoupon record, Integer pageIndex, Integer pageSize) { | |||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> ttCouponMapper.findList(record)); | |||
| } | |||
| @Override | |||
| public TtCoupon getById(Long id) { | |||
| return ttCouponMapper.selectById(id); | |||
| } | |||
| @Override | |||
| public ResultData saveOrUpdate(TtCoupon record) { | |||
| if (StringUtils.isNotEmpty(record.getSalePriceStr())) { | |||
| record.setSalePrice(new BigDecimal(record.getSalePriceStr()).multiply(new BigDecimal(100)).intValue()); | |||
| } | |||
| if (StringUtils.isNotEmpty(record.getOrigPriceStr())) { | |||
| record.setOrigPrice(new BigDecimal(record.getOrigPriceStr()).multiply(new BigDecimal(100)).intValue()); | |||
| } | |||
| if (StringUtils.isBlank(record.getCoverPicture())) { | |||
| List<String> strList = new ArrayList<String>(); | |||
| if (StringUtils.isNotBlank(record.getCoverImg())) { | |||
| strList.add(record.getCoverImg()); | |||
| } | |||
| if (strList.size() > 1) { | |||
| record.setCoverPicture(JSONArray.toJSONString(strList)); | |||
| } | |||
| } | |||
| if (record.getId() == null) { | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| record.setId(idWorker.nextId()); | |||
| record.setCreateDate(new Date()); | |||
| record.setUpdateDate(new Date()); | |||
| ttCouponMapper.insert(record); | |||
| } else { | |||
| record.setUpdateDate(new Date()); | |||
| ttCouponMapper.updateById(record); | |||
| } | |||
| return new ResultData(record.getId()); | |||
| } | |||
| @Override | |||
| public void deleteById(Long id) { | |||
| ttCouponMapper.deleteById(id); | |||
| } | |||
| } | |||
| @@ -1,7 +1,7 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.iformall.mapper.TtCUserMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.TtCUser"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.tt.TtCUser"> | |||
| <id column="id" jdbcType="BIGINT" property="id"/> | |||
| <result column="user_id" jdbcType="BIGINT" property="userId"/> | |||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | |||
| @@ -223,7 +223,7 @@ | |||
| <if test=" null != sortColumns">order by ${sortColumns}</if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.TtCUser" resultMap="BaseResultMap"> | |||
| <select id="findList" parameterType="com.iformall.domain.po.tt.TtCUser" resultMap="BaseResultMap"> | |||
| select | |||
| <include refid="allColumns"/> | |||
| from tt_c_user | |||
| @@ -231,7 +231,7 @@ | |||
| </select> | |||
| <select id="listOpenId" parameterType="com.iformall.domain.po.TtCUser" resultType="String"> | |||
| <select id="listOpenId" parameterType="com.iformall.domain.po.tt.TtCUser" resultType="String"> | |||
| select open_id from tt_c_user where msg_count > 0 | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| @@ -241,7 +241,7 @@ | |||
| </if> | |||
| </select> | |||
| <update id="updateMsgCount" parameterType="com.iformall.domain.po.TtCUser"> | |||
| <update id="updateMsgCount" parameterType="com.iformall.domain.po.tt.TtCUser"> | |||
| update tt_c_user set msg_count = msg_count+2 | |||
| where 1=1 | |||
| <if test=" null != id "> | |||
| @@ -267,12 +267,12 @@ | |||
| and `open_id` = #{openId} | |||
| </update> | |||
| <select id="findByOpenId" parameterType="com.iformall.domain.po.TtCUser" resultMap="BaseResultMap"> | |||
| <select id="findByOpenId" parameterType="com.iformall.domain.po.tt.TtCUser" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns"/> from tt_c_user | |||
| where `app_id` = #{appId} and `open_id` = #{openId} | |||
| </select> | |||
| <select id="findByUnionId" parameterType="com.iformall.domain.po.TtCUser" resultMap="BaseResultMap"> | |||
| <select id="findByUnionId" parameterType="com.iformall.domain.po.tt.TtCUser" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns"/> from tt_c_user | |||
| where `open_app_id` = #{openAppId} and `union_id` = #{unionId} | |||
| </select> | |||
| @@ -415,7 +415,7 @@ | |||
| </select> | |||
| <update id="updateUserId" parameterType="com.iformall.domain.po.TtCUser"> | |||
| <update id="updateUserId" parameterType="com.iformall.domain.po.tt.TtCUser"> | |||
| update tt_c_user set user_id=#{userId} | |||
| where id = #{id} | |||
| </update> | |||
| @@ -1,7 +1,7 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.iformall.mapper.TtCouponMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.TtCoupon"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.tt.TtCoupon"> | |||
| <id column="id" jdbcType="BIGINT" property="id"/> | |||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | |||
| <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> | |||
| @@ -110,7 +110,7 @@ | |||
| <if test=" null != sortColumns">order by ${sortColumns}</if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.TtCoupon" resultMap="BaseResultMap"> | |||
| <select id="findList" parameterType="com.iformall.domain.po.tt.TtCoupon" resultMap="BaseResultMap"> | |||
| select | |||
| <include refid="allColumns"/> | |||
| from tt_coupon | |||
| @@ -134,7 +134,23 @@ | |||
| </update> | |||
| <update id="reduceSellCount" parameterType="Long"> | |||
| update tt_coupon SET sell_count = sell_count-1, update_date=now() where id = #{id} | |||
| update tt_coupon SET sell_count = sell_count-1, false_sell_count = false_sell_count-1, update_date=now() where id = #{id} | |||
| </update> | |||
| <update id="addAssessCount" parameterType="Long"> | |||
| update tt_coupon SET assess_count = assess_count+1, update_date=now() where id = #{id} | |||
| </update> | |||
| <update id="addCollectCount" parameterType="Long"> | |||
| update tt_coupon SET collect_count = collect_count+1, update_date=now() where id = #{id} | |||
| </update> | |||
| <update id="reduceCollectCount" parameterType="Long"> | |||
| update tt_coupon SET collect_count = collect_count-1, update_date=now() where id = #{id} | |||
| </update> | |||
| <update id="addPopularity" parameterType="java.util.HashMap"> | |||
| update tt_coupon SET popularity = popularity+#{popularity}, update_date=now() where id = #{id} | |||
| </update> | |||
| </mapper> | |||
| @@ -0,0 +1,124 @@ | |||
| package com.iformall.controller.tt; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.po.tt.TtCoupon; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.service.tt.TtCouponService; | |||
| import com.iformall.utils.RedisLock; | |||
| import io.swagger.annotations.Api; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| import io.swagger.annotations.ApiOperation; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.*; | |||
| @RestController | |||
| @RequestMapping("ttCoupon") | |||
| @Api(description = "") | |||
| public class TtCouponController extends BaseController { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| private TtCouponService ttCouponService; | |||
| @Autowired | |||
| RedisLock redisLock; | |||
| @ApiOperation("分页列表接口") | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "-列表") | |||
| public ResultData list(@ModelAttribute TtCoupon record, Integer pageNum, Integer pageSize, Integer dataType) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponController::list"); | |||
| if (record == null) record = new TtCoupon(); | |||
| return new ResultData(ttCouponService.listAsPage(record, pageNum, pageSize)); | |||
| } | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "-新增") | |||
| public ResultData add(@RequestBody TtCoupon record) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponController::add"); | |||
| TenantEntity tenantEntity = getTenantInfo(); | |||
| record.updateTenantInfo(tenantEntity); | |||
| ResultData resultData = ttCouponService.saveOrUpdate(record); | |||
| if (resultData.code != 200) { | |||
| return resultData; | |||
| } | |||
| //启动投放审批 | |||
| // if(record.getFlowParams() !=null && record.getFlowParams().size()>0) { | |||
| // record.getFlowParams().put("businessId",record.getId()); | |||
| // wxFlowService.start(record.getFlowParams(), getUserId(), getUser().getName(), tenantEntity); | |||
| // //修改coupon applyStatus状态为审核中 | |||
| // record.setPutApplyStatus(EnumRentContractAppStatus.APPLYING.getCode()); | |||
| // } | |||
| return resultData; | |||
| } | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "更新") | |||
| public ResultData update(@RequestBody TtCoupon record) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponController::update"); | |||
| if (record.getId() == null) { | |||
| return new ResultData(ResultData.ERROR, "缺少id"); | |||
| } | |||
| record.updateTenantInfo(getTenantInfo()); | |||
| if(EnumDelFlag.YES.getCode().equals(record.getIsDel())){ | |||
| } | |||
| TtCoupon coupon = ttCouponService.getById(record.getId()); | |||
| if (null == coupon) { | |||
| return new ResultData(ResultData.ERROR, "未查询到数据。"+record.getId()); | |||
| } | |||
| //启动审批流 | |||
| // if (record.getFlowParams() != null && record.getFlowParams().size() > 0) { | |||
| // logger.info("------coupon.update().businessType:"+record.getFlowParams().get("businessType")); | |||
| // record.getFlowParams().put("businessId",record.getId()); | |||
| // wxFlowService.start(record.getFlowParams(), getUserId(), getUser().getName(), getTenantInfo()); | |||
| // //作废审批 | |||
| // if (EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode().equals(record.getStatus())) { | |||
| // record.setCancleApplyStatus(EnumRentContractAppStatus.APPLYING.getCode()); | |||
| // return new ResultData(record); | |||
| // } else { | |||
| // //投放审批 | |||
| // record.setPutApplyStatus(EnumRentContractAppStatus.APPLYING.getCode()); | |||
| // } | |||
| // } | |||
| return ttCouponService.saveOrUpdate(record); | |||
| } | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "券投放-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponController::delete"); | |||
| ttCouponService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "券投放-查询") | |||
| public ResultData findById(@RequestParam Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponController::findById"); | |||
| return new ResultData(ttCouponService.getById(id)); | |||
| } | |||
| } | |||
| @@ -1,7 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.domain.po.TtCUser; | |||
| import com.iformall.domain.po.tt.TtCUser; | |||
| import com.iformall.domain.po.WxAppinfo; | |||
| import com.iformall.domain.po.WxCUserBasicInfo; | |||
| import com.iformall.domain.po.base.BaseCUserEntity; | |||
| @@ -0,0 +1,44 @@ | |||
| package com.iformall.controller; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.tt.TtCoupon; | |||
| import com.iformall.service.tt.TtCouponService; | |||
| import io.swagger.annotations.Api; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| import io.swagger.annotations.ApiOperation; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.*; | |||
| @RestController | |||
| @RequestMapping("ttCoupon") | |||
| @Api(description = "") | |||
| public class TtCouponController extends BaseController { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| private TtCouponService ttCouponService; | |||
| @ApiOperation("分页列表接口") | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| public ResultData list(@ModelAttribute TtCoupon record, Integer pageNum, Integer pageSize, Integer dataType) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponController::list"); | |||
| if (record == null) record = new TtCoupon(); | |||
| return new ResultData(ttCouponService.listAsPage(record, pageNum, pageSize)); | |||
| } | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| public ResultData findById(@RequestParam Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponController::findById"); | |||
| return new ResultData(ttCouponService.getById(id)); | |||
| } | |||
| } | |||
| @@ -11,6 +11,7 @@ import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.po.tt.TtCUser; | |||
| import com.iformall.domain.vo.WxCUserVo; | |||
| import com.iformall.douyin.miniapp.api.TtMaService; | |||
| import com.iformall.enums.*; | |||