Commit 9b643891 authored by jiaorz's avatar jiaorz

注册接口修改

parent 0c1a0c05
...@@ -16,9 +16,6 @@ public class ObjectRestResponse<T> extends BaseResponse { ...@@ -16,9 +16,6 @@ public class ObjectRestResponse<T> extends BaseResponse {
private static final Integer WEB_CALL_RESULT_FAILED = ResultCode.FAILED_CODE; private static final Integer WEB_CALL_RESULT_FAILED = ResultCode.FAILED_CODE;
private static final String RESULT_SUCCESS_MSG = "操作成功"; private static final String RESULT_SUCCESS_MSG = "操作成功";
private static final String RESULT_FAIL_MSG = "操作失败"; private static final String RESULT_FAIL_MSG = "操作失败";
private static final String PARAM_IS_EMPTY = "参数为空";
public boolean isRel() { public boolean isRel() {
return rel; return rel;
} }
......
package com.xxfc.platform.activity.entity;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
@Table(name = "integral_rule")
@Data
public class IntegralRule{
/**
* 主键id
*/
@Id
private Integer id;
/**
* 周期单位:0-天,1-周;3-月;4-季;5-年
*/
private Integer period;
/**
* 次数
*/
private Integer number;
/**
* 积分
*/
private Integer point;
/**
* 积分兑换:金额/分
*/
private BigDecimal price;
/**
* 是否连续:0-不连续;1-连续
*/
@Column(name = "is_continuity")
private Boolean isContinuity;
/**
* 多少天后连续算
*/
@Column(name = "finish_day")
private Integer finishDay;
/**
* n天获取的积分
*/
@Column(name = "finish_point")
private Integer finishPoint;
/**
* 是否启用:1-启用;0-停用
*/
private Boolean status;
/**
* 创建时间
*/
@Column(name = "crt_time")
private Long crtTime;
/**
* 是否删除:0-正常;1-删除
*/
private Boolean isdel;
/**
* 规则开始时间
*/
@Column(name = "start_time")
private Long startTime;
/**
* 规则结束时间
*/
@Column(name = "end_time")
private Long endTime;
/**
* 更新时间
*/
@Column(name = "upd_time")
private Long updTime;
/**
* 备注
*/
private String remarks;
/**
* 描述
*/
private String desc;
/**
* 规则图片
*/
private String img;
/**
* 排序
*/
@Column(name = "order_id")
private Integer orderId;
/**
* 规则名称
*/
private String name;
/**
* 获取积分规则
*/
private String regulation;
/**
* json字符串 如:[{"day":4,"integeral":8},{"day":4,"integeral":8}]
*/
@Column(name = "other_rule")
private String otherRule;
}
\ No newline at end of file
package com.xxfc.platform.activity.entity;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
@Table(name = "integral_sign_record")
@Data
public class IntegralSignRecord {
/**
* 主键id
*/
@Id
private Integer id;
/**
* 用户id
*/
@Column(name = "user_id")
private Integer userId;
/**
* 连续签到天数
*/
@Column(name = "sign_days")
private Integer signDays;
/**
* 开始时间
*/
@Column(name = "start_time")
private Long startTime;
/**
* 最后签到时间
*/
@Column(name = "last_time")
private Long lastTime;
/**
* 是否删除:0-正常;1-删除
*/
private Boolean isdel;
}
\ No newline at end of file
package com.xxfc.platform.activity.entity;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
@Table(name = "integral_user_record")
@Data
public class IntegralUserRecord {
/**
* 主键id
*/
@Id
private Integer id;
/**
* 用户id
*/
@Column(name = "user_id")
private Integer userId;
/**
* 0-获取积分;1-抵扣积分
*/
private Boolean type;
/**
* 积分数
*/
private Integer point;
/**
* 积分规则id
*/
@Column(name = "integral_rule_id")
private Integer integralRuleId;
/**
* 积分时间
*/
@Column(name = "crt_time")
private Long crtTime;
/**
* 是否有效:1-有效;0-失效
*/
@Column(name = "is_valid")
private Boolean isValid;
/**
* 是否删除:0-正常;1-删除
*/
private Boolean isdel;
/**
* 获取积分的途径id:如订单id,评论id,签到记录id
*/
@Column(name = "channel_id")
private Integer channelId;
}
\ No newline at end of file
package com.xxfc.platform.activity.entity;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
@Table(name = "integral_user_total")
@Data
public class IntegralUserTotal {
/**
* 主键id
*/
@Id
private Integer id;
/**
* 用户id
*/
@Column(name = "user_id")
private Integer userId;
/**
* 总收益积分
*/
@Column(name = "total_point")
private Integer totalPoint;
/**
* 剩余收益积分
*/
@Column(name = "rest_point")
private Integer restPoint;
@Column(name = "crt_time")
private Long crtTime;
@Column(name = "upd_time")
private Long updTime;
/**
* 是否删除:0-正常;1-删除
*/
private Boolean isdel;
}
\ No newline at end of file
package com.xxfc.platform.activity.Feign; package com.xxfc.platform.activity.feign;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.xxfc.platform.activity.vo.UserCouponVo; import com.xxfc.platform.activity.vo.UserCouponVo;
......
package com.xxfc.platform.activity.user;
import com.github.wxiaoqi.security.admin.feign.UserFeign;
import com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
@Slf4j
@Component
public class UserInfoBiz {
@Autowired
UserFeign userFeign;
public AppUserDTO getUserInfo() {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
if(request.getHeader("Authorization") !=null) {
return userFeign.userDetailByToken(request.getHeader("Authorization")).getData();
} else if(request.getHeader("access_token") != null) {
return userFeign.userDetailByToken(request.getHeader("access_token")).getData();
}
return null;
}
}
package com.xxfc.platform.activity.biz;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.xxfc.platform.activity.entity.IntegralRule;
import com.xxfc.platform.activity.mapper.IntegralRuleMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service
@Transactional
public class IntegralRuleBiz extends BaseBiz<IntegralRuleMapper, IntegralRule> {
/**
* 添加、更新积分规则
* @param integralRule
* @return
*/
public ObjectRestResponse add(IntegralRule integralRule) {
if(integralRule == null) {
return ObjectRestResponse.paramIsEmpty();
}
if(integralRule.getId() != null) {//已存在,更新
IntegralRule oldValue = mapper.selectByPrimaryKey(integralRule.getId());
if(oldValue == null) {
return ObjectRestResponse.createDefaultFail();
}
BeanUtil.copyProperties(integralRule, oldValue, CopyOptions.create().setIgnoreNullValue(true).setIgnoreError(true));
mapper.updateByPrimaryKeySelective(oldValue);
return ObjectRestResponse.succ();
}
mapper.insertSelective(integralRule);
return ObjectRestResponse.succ();
}
/**
* 删除积分规则
* @param id
* @return
*/
public ObjectRestResponse deleteOne(Integer id) {
if(id == null || id < 0) {
return ObjectRestResponse.paramIsEmpty();
}
IntegralRule oldValue = mapper.selectByPrimaryKey(id);
if(oldValue == null) {
return ObjectRestResponse.createDefaultFail();
}
oldValue.setIsdel(true);
mapper.updateByPrimaryKeySelective(oldValue);
return ObjectRestResponse.succ();
}
public ObjectRestResponse<IntegralRule> getOne(IntegralRule integralRule) {
if(integralRule == null) {
return ObjectRestResponse.paramIsEmpty();
}
IntegralRule oldValue = mapper.selectByPrimaryKey(integralRule.getId());
if(oldValue == null) {
return ObjectRestResponse.createDefaultFail();
}
return ObjectRestResponse.succ(oldValue);
}
public ObjectRestResponse<List<IntegralRule>> getAll(IntegralRule integralRule) {
List<IntegralRule> integralRules = mapper.selectAllByParam(integralRule);
return ObjectRestResponse.succ(integralRules);
}
}
package com.xxfc.platform.activity.biz;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
import com.xxfc.platform.activity.entity.IntegralSignRecord;
import com.xxfc.platform.activity.mapper.IntegralSignRecordMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
@Transactional
public class IntegralSignRecordBiz extends BaseBiz<IntegralSignRecordMapper, IntegralSignRecord> {
}
package com.xxfc.platform.activity.biz;
import com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.xxfc.platform.activity.entity.IntegralUserRecord;
import com.xxfc.platform.activity.mapper.IntegralUserRecordMapper;
import com.xxfc.platform.activity.user.UserInfoBiz;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
@Transactional
@Slf4j
public class IntegralUserRecordBiz extends BaseBiz<IntegralUserRecordMapper, IntegralUserRecord> {
@Autowired
UserInfoBiz userInfoBiz;
/**
* 添加用户积分记录
* @param integralUserRecord
* @return
*/
public ObjectRestResponse add(IntegralUserRecord integralUserRecord) {
return ObjectRestResponse.succ();
}
/**
* 删除一个用户记录
* @param id
* @return
*/
public ObjectRestResponse deleteOne(Integer id) {
if(id == null || id <=0 ) {
return ObjectRestResponse.paramIsEmpty();
}
IntegralUserRecord integralUserRecord = mapper.selectByPrimaryKey(id);
if(integralUserRecord == null) {
log.info("删除的用户记录不存在,要删除的id ={}", id);
return ObjectRestResponse.createDefaultFail();
}
integralUserRecord.setIsdel(true);
mapper.updateByPrimaryKeySelective(integralUserRecord);
return ObjectRestResponse.succ();
}
/**
* 根据获取某个用户的列表
* @return
*/
public ObjectRestResponse<IntegralUserRecord> getUserList() {
AppUserDTO appUserDTO = userInfoBiz.getUserInfo();
if (appUserDTO == null) {
return ObjectRestResponse.createFailedResult(508, "token is null or invalid");
}
return ObjectRestResponse.succ();
}
}
package com.xxfc.platform.activity.biz;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.xxfc.platform.activity.entity.IntegralUserTotal;
import com.xxfc.platform.activity.mapper.IntegralUserTotalMapper;
import com.xxfc.platform.activity.user.UserInfoBiz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service
@Transactional
public class IntegralUserTotalBiz extends BaseBiz<IntegralUserTotalMapper, IntegralUserTotal> {
@Autowired
UserInfoBiz userInfoBiz;
/**
* 添加用户总积分
* @param integralUserTotal
* @return
*/
public ObjectRestResponse add(IntegralUserTotal integralUserTotal) {
AppUserDTO appUserDTO = userInfoBiz.getUserInfo();
if (appUserDTO == null) {
return ObjectRestResponse.createFailedResult(508, "token is null or invalid");
}
if(integralUserTotal == null) {
return ObjectRestResponse.paramIsEmpty();
}
integralUserTotal.setUserId(appUserDTO.getUserid());
if(integralUserTotal.getId() != null) {
IntegralUserTotal oldValue = mapper.selectByPrimaryKey(integralUserTotal.getId());
if(oldValue == null) {
return ObjectRestResponse.createDefaultFail();
}
BeanUtil.copyProperties(integralUserTotal, oldValue, CopyOptions.create().setIgnoreNullValue(true).setIgnoreError(true));
mapper.updateByPrimaryKeySelective(oldValue);
return ObjectRestResponse.succ();
}
mapper.insertSelective(integralUserTotal);
return ObjectRestResponse.succ();
}
/**
* 删除信息
* @param id
* @return
*/
public ObjectRestResponse deleteOne() {
AppUserDTO appUserDTO = userInfoBiz.getUserInfo();
if (appUserDTO == null) {
return ObjectRestResponse.createFailedResult(508, "token is null or invalid");
}
IntegralUserTotal integralUserTotal = new IntegralUserTotal();
integralUserTotal.setUserId(appUserDTO.getUserid());
List<IntegralUserTotal> oldValue = mapper.selectAllByParam(integralUserTotal);
if(oldValue == null || oldValue.size() <= 0) {
return ObjectRestResponse.createDefaultFail();
}
oldValue.get(0).setIsdel(true);
mapper.updateByPrimaryKeySelective(oldValue.get(0));
return ObjectRestResponse.succ();
}
/**
* 获取某个用户的积分信息
* @return
*/
public ObjectRestResponse<IntegralUserTotal> getByUser() {
AppUserDTO appUserDTO = userInfoBiz.getUserInfo();
if (appUserDTO == null) {
return ObjectRestResponse.createFailedResult(508, "token is null or invalid");
}
IntegralUserTotal integralUserTotal = new IntegralUserTotal();
integralUserTotal.setUserId(appUserDTO.getUserid());
List<IntegralUserTotal> oldValue = mapper.selectAllByParam(integralUserTotal);
if(oldValue == null || oldValue.size() <= 0) {
return ObjectRestResponse.createDefaultFail();
}
return ObjectRestResponse.succ(oldValue.get(0));
}
/**
* 获取所有的信息
* @param integralUserTotal
* @return
*/
public ObjectRestResponse<List<IntegralUserTotal>> getAll(IntegralUserTotal integralUserTotal) {
List<IntegralUserTotal> integralUserTotals = mapper.selectAllByParam(integralUserTotal);
return ObjectRestResponse.succ(integralUserTotals);
}
}
package com.xxfc.platform.activity.mapper;
import com.xxfc.platform.activity.entity.IntegralRule;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
public interface IntegralRuleMapper extends Mapper<IntegralRule> {
public List<IntegralRule> selectAllByParam(IntegralRule integralRule);
}
\ No newline at end of file
package com.xxfc.platform.activity.mapper;
import com.xxfc.platform.activity.entity.IntegralSignRecord;
import tk.mybatis.mapper.common.Mapper;
public interface IntegralSignRecordMapper extends Mapper<IntegralSignRecord> {
}
\ No newline at end of file
package com.xxfc.platform.activity.mapper;
import com.xxfc.platform.activity.entity.IntegralUserRecord;
import tk.mybatis.mapper.common.Mapper;
public interface IntegralUserRecordMapper extends Mapper<IntegralUserRecord> {
}
\ No newline at end of file
package com.xxfc.platform.activity.mapper;
import com.xxfc.platform.activity.entity.IntegralUserTotal;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
public interface IntegralUserTotalMapper extends Mapper<IntegralUserTotal> {
List<IntegralUserTotal> selectAllByParam(IntegralUserTotal integralUserTotal);
}
\ No newline at end of file
package com.xxfc.platform.activity.rest;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.xxfc.platform.activity.biz.IntegralRuleBiz;
import com.xxfc.platform.activity.entity.IntegralRule;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping(value = "integralRule")
@Api(value = "积分规则")
public class IntegralRuleController {
@Autowired
IntegralRuleBiz integralRuleBiz;
@PostMapping(value = "/add")
@ApiOperation(value = "添加积分规则")
public ObjectRestResponse add(IntegralRule integralRule) {
return integralRuleBiz.add(integralRule);
}
@PostMapping(value = "/delete")
@ApiOperation(value = "删除积分规则")
public ObjectRestResponse deleteOne(Integer id) {
return integralRuleBiz.deleteOne(id);
}
@GetMapping(value = "/one")
@ApiOperation(value = "根据id获取制定规则")
public ObjectRestResponse<IntegralRule> getOne(IntegralRule integralRule) {
return integralRuleBiz.getOne(integralRule);
}
@GetMapping(value = "/list")
@ApiOperation(value = "获取所有的规则")
public ObjectRestResponse<List<IntegralRule>> getList(IntegralRule integralRule) {
return integralRuleBiz.getAll(integralRule);
}
}
package com.xxfc.platform.activity.rest;
import com.xxfc.platform.activity.biz.IntegralSignRecordBiz;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(value = "integralSignRecord")
@Api(value = "用户签到记录")
public class IntegralSignRecordController {
@Autowired
IntegralSignRecordBiz integralSignRecordBiz;
}
package com.xxfc.platform.activity.rest;
import com.xxfc.platform.activity.biz.IntegralUserRecordBiz;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(value = "integralUserRecord")
@Api(value = "用户积分记录")
public class IntegralUserRecordController {
@Autowired
IntegralUserRecordBiz integralUserRecordBiz;
}
package com.xxfc.platform.activity.rest;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(value = "integralUserTotal")
@Api(value = "用户总积分")
public class IntegralUserTotalController {
}
<?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.xxfc.platform.activity.mapper.IntegralRuleMapper" >
<resultMap id="BaseResultMap" type="com.xxfc.platform.activity.entity.IntegralRule" >
<!--
WARNING - @mbg.generated
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="period" property="period" jdbcType="BIT" />
<result column="number" property="number" jdbcType="INTEGER" />
<result column="point" property="point" jdbcType="INTEGER" />
<result column="price" property="price" jdbcType="DECIMAL" />
<result column="is_continuity" property="isContinuity" jdbcType="BIT" />
<result column="finish_day" property="finishDay" jdbcType="INTEGER" />
<result column="finish_point" property="finishPoint" jdbcType="INTEGER" />
<result column="status" property="status" jdbcType="BIT" />
<result column="crt_time" property="crtTime" jdbcType="BIGINT" />
<result column="isdel" property="isdel" jdbcType="BIT" />
<result column="start_time" property="startTime" jdbcType="BIGINT" />
<result column="end_time" property="endTime" jdbcType="BIGINT" />
<result column="upd_time" property="updTime" jdbcType="BIGINT" />
<result column="remarks" property="remarks" jdbcType="VARCHAR" />
<result column="desc" property="desc" jdbcType="VARCHAR" />
<result column="img" property="img" jdbcType="VARCHAR" />
<result column="order_id" property="orderId" jdbcType="INTEGER" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="regulation" property="regulation" jdbcType="LONGVARCHAR" />
<result column="other_rule" property="otherRule" jdbcType="LONGVARCHAR" />
</resultMap>
<select id="selectAllByParam" resultType="com.xxfc.platform.activity.entity.IntegralRule" parameterType="com.xxfc.platform.activity.entity.IntegralRule">
select * from integral_rule
<where>
<if test="id != null">
and id = #{id}
</if>
<if test="name != null">
and name like concat("%", #{name}, "%")
</if>
</where>
order by order_id DESC ,crt_time DESC
</select>
</mapper>
\ No newline at end of file
<?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.xxfc.platform.activity.mapper.IntegralSignRecordMapper" >
<resultMap id="BaseResultMap" type="com.xxfc.platform.activity.entity.IntegralSignRecord" >
<!--
WARNING - @mbg.generated
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="user_id" property="userId" jdbcType="INTEGER" />
<result column="sign_days" property="signDays" jdbcType="INTEGER" />
<result column="start_time" property="startTime" jdbcType="BIGINT" />
<result column="last_time" property="lastTime" jdbcType="BIGINT" />
</resultMap>
</mapper>
\ No newline at end of file
<?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.xxfc.platform.activity.mapper.IntegralUserRecordMapper" >
<resultMap id="BaseResultMap" type="com.xxfc.platform.activity.entity.IntegralUserRecord" >
<!--
WARNING - @mbg.generated
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="user_id" property="userId" jdbcType="INTEGER" />
<result column="type" property="type" jdbcType="BIT" />
<result column="point" property="point" jdbcType="INTEGER" />
<result column="integral_rule_id" property="integralRuleId" jdbcType="INTEGER" />
<result column="crt_time" property="crtTime" jdbcType="BIGINT" />
<result column="is_valid" property="isValid" jdbcType="BIT" />
<result column="isdel" property="isdel" jdbcType="BIT" />
<result column="channel_id" property="channelId" jdbcType="INTEGER" />
</resultMap>
</mapper>
\ No newline at end of file
<?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.xxfc.platform.activity.mapper.IntegralUserTotalMapper" >
<resultMap id="BaseResultMap" type="com.xxfc.platform.activity.entity.IntegralUserTotal" >
<!--
WARNING - @mbg.generated
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="user_id" property="userId" jdbcType="INTEGER" />
<result column="total_point" property="totalPoint" jdbcType="INTEGER" />
<result column="rest_point" property="restPoint" jdbcType="INTEGER" />
<result column="crt_time" property="crtTime" jdbcType="BIGINT" />
<result column="upd_time" property="updTime" jdbcType="BIGINT" />
</resultMap>
<select id="selectAllByParam" parameterType="com.xxfc.platform.activity.entity.IntegralUserTotal" resultType="com.xxfc.platform.activity.entity.IntegralUserTotal">
select * from integral_user_total
<where>
<if test="userId != null">
and user_id = #{userId}
</if>
</where>
order by upd_time DESC
</select>
</mapper>
\ No newline at end of file
...@@ -121,6 +121,7 @@ public class BaseOrderController extends CommonBaseController { ...@@ -121,6 +121,7 @@ public class BaseOrderController extends CommonBaseController {
@ResponseBody @ResponseBody
@ApiOperation(value = "获取后台订单列表") @ApiOperation(value = "获取后台订单列表")
@IgnoreClientToken @IgnoreClientToken
@CrossOrigin
public ObjectRestResponse<PageDataVO<OrderPageVO>> selectByUser(QueryOrderList dto) { public ObjectRestResponse<PageDataVO<OrderPageVO>> selectByUser(QueryOrderList dto) {
if (dto.getStartTime() != null) { if (dto.getStartTime() != null) {
if (dto.getEndTime() == null) { if (dto.getEndTime() == null) {
......
...@@ -2,6 +2,7 @@ package com.xxfc.platform.vehicle.rest; ...@@ -2,6 +2,7 @@ package com.xxfc.platform.vehicle.rest;
import com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO; import com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO;
import com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken; import com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken;
import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.xxfc.platform.vehicle.biz.VehicleLicenseBiz; import com.xxfc.platform.vehicle.biz.VehicleLicenseBiz;
import com.xxfc.platform.vehicle.common.RestResponse; import com.xxfc.platform.vehicle.common.RestResponse;
...@@ -60,6 +61,8 @@ public class VehicleLicenseController extends VehicleBaseController<VehicleLicen ...@@ -60,6 +61,8 @@ public class VehicleLicenseController extends VehicleBaseController<VehicleLicen
return RestResponse.suc(baseBiz.getOneById(id)); return RestResponse.suc(baseBiz.getOneById(id));
} }
@RequestMapping(value = "/license/company/getOne", method = RequestMethod.GET) @RequestMapping(value = "/license/company/getOne", method = RequestMethod.GET)
@IgnoreUserToken
@IgnoreClientToken
public RestResponse<VehicleUserLicense> getOne( public RestResponse<VehicleUserLicense> getOne(
@RequestParam(value="id",defaultValue="0")Integer id) throws Exception { @RequestParam(value="id",defaultValue="0")Integer id) throws Exception {
return RestResponse.suc(baseBiz.getOneById(id)); return RestResponse.suc(baseBiz.getOneById(id));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment