添加活动列表
This commit is contained in:
parent
e25935624e
commit
000bf44a63
|
|
@ -217,21 +217,20 @@ public class LoginContoller {
|
|||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * 获取会员码
|
||||
// *
|
||||
// * @param openId
|
||||
// * @param token
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// @GetMapping("createCardNo")
|
||||
// public Result createCardNo(@RequestHeader("openId") String openId, @RequestHeader("token") String token, @RequestHeader("id") String id,
|
||||
//
|
||||
// @RequestParam("shopId") String shopId
|
||||
// ) {
|
||||
// return loginService.createCardNo(id, openId,shopId);
|
||||
// }
|
||||
/**
|
||||
* 获取会员码
|
||||
*
|
||||
* @param openId
|
||||
* @param token
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("createCardNo")
|
||||
public Result createCardNo(@RequestHeader("openId") String openId, @RequestHeader("token") String token, @RequestHeader("id") String id,
|
||||
@RequestParam("shopId") String shopId
|
||||
) {
|
||||
return loginService.createCardNo(id, openId,shopId);
|
||||
}
|
||||
|
||||
@GetMapping("/userInfo")
|
||||
public Result userInfo(@RequestParam("userId") Integer userId) {
|
||||
|
|
|
|||
|
|
@ -127,9 +127,15 @@ public class PayController {
|
|||
}
|
||||
|
||||
|
||||
// public Result getActive(@RequestHeader("token") String token,@RequestParam("shopId") String shopId,@RequestParam("page") int page,@RequestParam("pageSize") int pageSize){
|
||||
//
|
||||
// }
|
||||
@RequestMapping("getActive")
|
||||
public Result getActive(
|
||||
@RequestHeader("token") String token,
|
||||
@RequestParam("shopId") String shopId,
|
||||
@RequestParam("page") int page,
|
||||
@RequestParam("pageSize") int pageSize){
|
||||
return payService.getActivate(shopId,page,pageSize);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Param;
|
|||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
@Mapper
|
||||
|
|
@ -23,4 +24,6 @@ public interface TbActivateMapper {
|
|||
int updateByPrimaryKey(TbActivate record);
|
||||
|
||||
TbActivate selectByAmount(@Param("shopId") String shopId,@Param("amount") BigDecimal amount);
|
||||
|
||||
List<TbActivate> selectByShpopId(String shopId);
|
||||
}
|
||||
|
|
@ -24,6 +24,8 @@ import com.chaozhanggui.system.cashierservice.thirdpay.service.ThirdPayService;
|
|||
import com.chaozhanggui.system.cashierservice.util.*;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
|
@ -925,6 +927,14 @@ public class PayService {
|
|||
}
|
||||
|
||||
|
||||
public Result getActivate(String shopId,int page ,int pageSize){
|
||||
PageHelper.startPage(page, pageSize);
|
||||
List<TbActivate> list=tbActivateMapper.selectByShpopId(shopId);
|
||||
PageInfo pageInfo=new PageInfo(list);
|
||||
return Result.success(CodeEnum.SUCCESS,pageInfo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -118,4 +118,8 @@
|
|||
<select id="selectByAmount" resultMap="BaseResultMap">
|
||||
select * from tb_activate where shop_id=#{shopId} and is_del=0 and min_num <= #{amount} and max_num >={amount}
|
||||
</select>
|
||||
|
||||
<select id="selectByShpopId" resultMap="BaseResultMap">
|
||||
select * from tb_activate where shop_id=#{shopId}
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue