| @@ -313,8 +313,14 @@ public class WxFinanceController extends BaseController { | |||
| if (!this.isValidPayTime(record.getReceiveDate(),record)) { | |||
| return new ResultData(Result.ERROR,"支付时间已结账,不允许操作"); | |||
| } | |||
| Map map = wxFinanceService.createReceive(record,this.getUser()); | |||
| return new ResultData(map); | |||
| try { | |||
| Map map = wxFinanceService.createReceive(record,this.getUser()); | |||
| return new ResultData(map); | |||
| }catch(Exception e) { | |||
| logger.error("createReceive error.",e); | |||
| return new ResultData(Result.ERROR,e.getMessage()); | |||
| } | |||
| } | |||
| @ApiOperation("更新收款单时间") | |||
| @@ -1,16 +1,27 @@ | |||
| package com.iformall.controller.market; | |||
| import com.github.pagehelper.PageInfo; | |||
| 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.dto.WxUserCouponDto; | |||
| import com.iformall.domain.po.WxUserResume; | |||
| import com.iformall.domain.po.base.BaseEntity; | |||
| import com.iformall.enums.EnumShopSellStatus; | |||
| import com.iformall.enums.EnumUserResumeStatus; | |||
| import com.iformall.service.WxUserResumeService; | |||
| import io.swagger.annotations.Api; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| import io.swagger.annotations.ApiOperation; | |||
| import java.util.ArrayList; | |||
| import java.util.HashMap; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| @@ -25,6 +36,19 @@ public class WxUserResumeController extends BaseController { | |||
| @Autowired | |||
| private WxUserResumeService wxUserResumeService; | |||
| @GetMapping("statusList") | |||
| public ResultData statusList() { | |||
| List<Map> list = new ArrayList<Map>(); | |||
| for (EnumUserResumeStatus t : EnumUserResumeStatus.values()) { | |||
| Map m = new HashMap(); | |||
| m.put("id", t.getCode()); | |||
| m.put("name", t.getMessage()); | |||
| list.add(m); | |||
| } | |||
| return new ResultData(list); | |||
| } | |||
| @ApiOperation("分页列表接口") | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @@ -33,10 +57,24 @@ public class WxUserResumeController extends BaseController { | |||
| public ResultData list(@ModelAttribute WxUserResume record, Integer pageNum, Integer pageSize) { | |||
| if (null == record) record = new WxUserResume(); | |||
| record.updateTenantInfo(getTenantInfo()); | |||
| record.setSortColumns(BaseEntity.SortField.Id_DESC); | |||
| record.setSortColumns("update_time desc"); | |||
| PageInfo<WxUserResume> page = wxUserResumeService.listAsPage(record, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @ApiOperation("设置状态") | |||
| @PostMapping("setStatus") | |||
| public ResultData setStatus(@RequestBody WxUserResume record) { | |||
| record.updateTenantInfo(getTenantInfo()); | |||
| wxUserResumeService.saveOrUpdate(record); | |||
| return new ResultData(); | |||
| } | |||
| @ApiOperation("设置是否已联系") | |||
| @PostMapping("setContracted") | |||
| public ResultData setContracted(@RequestBody WxUserResume record) { | |||
| record.updateTenantInfo(getTenantInfo()); | |||
| wxUserResumeService.saveOrUpdate(record); | |||
| return new ResultData(); | |||
| } | |||
| } | |||
| @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.enums.EnumCUserBaseInfoSex; | |||
| import com.iformall.enums.EnumUserResumeStatus; | |||
| import com.iformall.utils.DateUtils; | |||
| import lombok.Data; | |||
| @@ -67,4 +68,18 @@ public class WxUserResume extends TenantEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value="",name="updateTime") | |||
| private Date updateTime; | |||
| @io.swagger.annotations.ApiModelProperty(value="EnumUserResumeStatus",name="sex") | |||
| public Integer status; | |||
| @TableField(exist = false) | |||
| private String statusName; | |||
| public String getStatusName() { | |||
| if (null != status) { | |||
| return EnumUserResumeStatus.getEnum(status).getMessage(); | |||
| } | |||
| return null; | |||
| } | |||
| @io.swagger.annotations.ApiModelProperty(value="是否联系过",name="isContracted") | |||
| public Integer isContracted; | |||
| } | |||
| @@ -0,0 +1,42 @@ | |||
| package com.iformall.enums; | |||
| public enum EnumUserResumeStatus { | |||
| AUDITINT(0, "审核中"), | |||
| AUDITED(1, "审核通过"), | |||
| REJECT(2,"审核拒绝"), | |||
| ; | |||
| private EnumUserResumeStatus(Integer code, String message) { | |||
| this.code = code; | |||
| this.message = message; | |||
| } | |||
| private Integer code; | |||
| private String message; | |||
| public static EnumUserResumeStatus getEnum(Integer code) { | |||
| for (EnumUserResumeStatus value : values()) { | |||
| if (value.getCode().equals(code)) { | |||
| return value; | |||
| } | |||
| } | |||
| return null; | |||
| } | |||
| public String getMessage() { | |||
| return message; | |||
| } | |||
| public void setMessage(String message) { | |||
| this.message = message; | |||
| } | |||
| public Integer getCode() { | |||
| return code; | |||
| } | |||
| public void setCode(Integer code) { | |||
| this.code = code; | |||
| } | |||
| } | |||
| @@ -680,6 +680,11 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||
| } | |||
| } | |||
| } | |||
| //TODO 校验金额+减免是不是超过了应收费用 | |||
| //冲抵总金额 | |||
| BigDecimal setOffTotal = new BigDecimal(0); | |||
| List<WxAllBill> bills = record.getBills(); | |||
| @@ -15,11 +15,13 @@ | |||
| <result column="birth_day" jdbcType="DATE" property="birthDay" /> | |||
| <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> | |||
| <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> | |||
| <result column="status" jdbcType="INTEGER" property="status" /> | |||
| <result column="is_contracted" jdbcType="INTEGER" property="isContracted" /> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`tenant_id`,`parent_tenant_id`,`user_id`,`user_phone`,`user_name`,`file_name`,`file_path`,`content`, | |||
| `sex`,`birth_day`,`create_time`,`update_time` | |||
| `sex`,`birth_day`,`create_time`,`update_time`,`status`,`is_contracted` | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| @@ -44,6 +46,14 @@ | |||
| and `sex` = #{sex} | |||
| </if> | |||
| <if test=" null != status "> | |||
| and `status` = #{status} | |||
| </if> | |||
| <if test=" null != isContracted "> | |||
| and `is_contracted` = #{isContracted} | |||
| </if> | |||
| <if test=" null != userPhone and '' != userPhone"> | |||
| and `user_phone` like concat('%', #{userPhone},'%') | |||
| </if> | |||