积分模块相关代码
This commit is contained in:
@@ -7,9 +7,9 @@ import com.chaozhanggui.system.cashierservice.service.TbMemberPointsService;
|
||||
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.Map;
|
||||
@RequestMapping("/api/points/member-points")
|
||||
public class TbMemberPointsController {
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private TbMemberPointsService tbMemberPointsService;
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,12 +4,12 @@ import com.chaozhanggui.system.cashierservice.entity.TbMemberPointsLog;
|
||||
import com.chaozhanggui.system.cashierservice.service.TbMemberPointsLogService;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.Map;
|
||||
@RequestMapping("/api/points/member-points-log")
|
||||
public class TbMemberPointsLogController {
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private TbMemberPointsLogService tbMemberPointsLogService;
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,10 +4,9 @@ import com.chaozhanggui.system.cashierservice.entity.TbPointsBasicSetting;
|
||||
import com.chaozhanggui.system.cashierservice.service.TbPointsBasicSettingService;
|
||||
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
|
||||
/**
|
||||
* 积分基本设置
|
||||
@@ -19,7 +18,7 @@ import javax.annotation.Resource;
|
||||
@RequestMapping("/api/points/basic-setting")
|
||||
public class TbPointsBasicSettingController {
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private TbPointsBasicSettingService tbPointsBasicSettingService;
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,9 +5,9 @@ import com.chaozhanggui.system.cashierservice.service.TbPointsExchangeRecordServ
|
||||
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.Map;
|
||||
@RequestMapping("/api/points/exchange-record")
|
||||
public class TbPointsExchangeRecordController {
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private TbPointsExchangeRecordService tbPointsExchangeRecordService;
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,9 +5,9 @@ import com.chaozhanggui.system.cashierservice.service.TbPointsGoodsSettingServic
|
||||
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.Map;
|
||||
@RequestMapping("/api/points/goods-setting")
|
||||
public class TbPointsGoodsSettingController {
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private TbPointsGoodsSettingService tbPointsGoodsSettingService;
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.chaozhanggui.system.cashierservice.mapper.TbMemberPointsLogMapper;
|
||||
import com.chaozhanggui.system.cashierservice.service.TbMemberPointsLogService;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
@@ -22,6 +23,7 @@ import java.util.Map;
|
||||
* @since 2.0 2024-10-25
|
||||
*/
|
||||
@Service
|
||||
@Primary
|
||||
public class TbMemberPointsLogServiceImpl extends ServiceImpl<TbMemberPointsLogMapper, TbMemberPointsLog> implements TbMemberPointsLogService {
|
||||
|
||||
private LambdaQueryWrapper<TbMemberPointsLog> getWrapper(Map<String, Object> params) {
|
||||
|
||||
@@ -23,10 +23,11 @@ import com.chaozhanggui.system.cashierservice.service.TbMemberPointsService;
|
||||
import com.chaozhanggui.system.cashierservice.service.TbPointsBasicSettingService;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.Date;
|
||||
@@ -39,17 +40,18 @@ import java.util.Map;
|
||||
* @since 2.0 2024-10-25
|
||||
*/
|
||||
@Service
|
||||
@Primary
|
||||
public class TbMemberPointsServiceImpl extends ServiceImpl<TbMemberPointsMapper, TbMemberPoints> implements TbMemberPointsService {
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private TbMemberPointsLogMapper tbMemberPointsLogMapper;
|
||||
@Resource
|
||||
@Autowired
|
||||
private TbPointsBasicSettingMapper tbPointsBasicSettingMapper;
|
||||
@Resource
|
||||
@Autowired
|
||||
private TbShopUserMapper tbShopUserMapper;
|
||||
@Resource
|
||||
@Autowired
|
||||
private TbOrderInfoMapper tbOrderInfoMapper;
|
||||
@Resource
|
||||
@Autowired
|
||||
private TbPointsBasicSettingService tbPointsBasicSettingService;
|
||||
|
||||
private LambdaQueryWrapper<TbMemberPoints> getWrapper(Map<String, Object> params) {
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.chaozhanggui.system.cashierservice.entity.TbPointsBasicSetting;
|
||||
import com.chaozhanggui.system.cashierservice.exception.MsgException;
|
||||
import com.chaozhanggui.system.cashierservice.mapper.TbPointsBasicSettingMapper;
|
||||
import com.chaozhanggui.system.cashierservice.service.TbPointsBasicSettingService;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -19,6 +20,7 @@ import java.util.Date;
|
||||
* @since 2.0 2024-10-25
|
||||
*/
|
||||
@Service
|
||||
@Primary
|
||||
public class TbPointsBasicSettingServiceImpl extends ServiceImpl<TbPointsBasicSettingMapper, TbPointsBasicSetting> implements TbPointsBasicSettingService {
|
||||
|
||||
|
||||
|
||||
@@ -17,10 +17,11 @@ import com.chaozhanggui.system.cashierservice.mapper.*;
|
||||
import com.chaozhanggui.system.cashierservice.service.TbPointsExchangeRecordService;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
@@ -33,18 +34,19 @@ import java.util.Map;
|
||||
* @since 2.0 2024-10-25
|
||||
*/
|
||||
@Service
|
||||
@Primary
|
||||
public class TbPointsExchangeRecordServiceImpl extends ServiceImpl<TbPointsExchangeRecordMapper, TbPointsExchangeRecord> implements TbPointsExchangeRecordService {
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private TbPointsBasicSettingMapper tbPointsBasicSettingMapper;
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private TbPointsGoodsSettingMapper tbPointsGoodsSettingMapper;
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private TbMemberPointsMapper tbMemberPointsMapper;
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private TbMemberPointsLogMapper tbMemberPointsLogMapper;
|
||||
|
||||
private LambdaQueryWrapper<TbPointsExchangeRecord> getWrapper(Map<String, Object> params) {
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.chaozhanggui.system.cashierservice.mapper.TbPointsGoodsSettingMapper;
|
||||
import com.chaozhanggui.system.cashierservice.service.TbPointsGoodsSettingService;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -28,6 +29,7 @@ import java.util.Map;
|
||||
* @since 2.0 2024-10-25
|
||||
*/
|
||||
@Service
|
||||
@Primary
|
||||
public class TbPointsGoodsSettingServiceImpl extends ServiceImpl<TbPointsGoodsSettingMapper, TbPointsGoodsSetting> implements TbPointsGoodsSettingService {
|
||||
|
||||
|
||||
|
||||
6
src/main/resources/mapper/TbMemberPointsLogMapper.xml
Normal file
6
src/main/resources/mapper/TbMemberPointsLogMapper.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?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.chaozhanggui.system.cashierservice.mapper.TbMemberPointsLogMapper">
|
||||
|
||||
</mapper>
|
||||
6
src/main/resources/mapper/TbMemberPointsMapper.xml
Normal file
6
src/main/resources/mapper/TbMemberPointsMapper.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?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.chaozhanggui.system.cashierservice.mapper.TbMemberPointsMapper">
|
||||
|
||||
</mapper>
|
||||
6
src/main/resources/mapper/TbPointsBasicSettingMapper.xml
Normal file
6
src/main/resources/mapper/TbPointsBasicSettingMapper.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?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.chaozhanggui.system.cashierservice.mapper.TbPointsBasicSettingMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?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.chaozhanggui.system.cashierservice.mapper.TbPointsExchangeRecordMapper">
|
||||
|
||||
</mapper>
|
||||
6
src/main/resources/mapper/TbPointsGoodsSettingMapper.xml
Normal file
6
src/main/resources/mapper/TbPointsGoodsSettingMapper.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?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.chaozhanggui.system.cashierservice.mapper.TbPointsGoodsSettingMapper">
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user