分销申请新增问题修复及分销团队查询接口部分开发
This commit is contained in:
parent
ec3bccd734
commit
5c2c31fb7b
|
|
@ -44,6 +44,15 @@ public class CustomerController extends BaseController {
|
|||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@PostMapping("/app/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo appList(@RequestBody Customer customer)
|
||||
{
|
||||
startPage();
|
||||
List<Customer> list = customerService.getCustomerList(customer);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@RequiresPermissions("customer:customer:resetPwd")
|
||||
@GetMapping("/resetPwd/{customerId}")
|
||||
public String resetPwd(@PathVariable("customerId") Long customerId, ModelMap mmap)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,10 @@ package com.ghy.web.controller.customer;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.ghy.common.enums.PlaceStatus;
|
||||
import com.ghy.common.utils.CacheUtils;
|
||||
import com.ghy.customer.domain.Customer;
|
||||
import com.ghy.customer.service.CustomerService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
|
@ -32,6 +35,9 @@ public class CustomerPlaceController extends BaseController
|
|||
@Autowired
|
||||
private ICustomerPlaceService customerPlaceService;
|
||||
|
||||
@Autowired
|
||||
private CustomerService customerService;
|
||||
|
||||
@RequiresPermissions("customer:place:view")
|
||||
@GetMapping()
|
||||
public String place()
|
||||
|
|
@ -114,7 +120,11 @@ public class CustomerPlaceController extends BaseController
|
|||
// 验证码校验正确
|
||||
if(CacheUtils.get(customerPlace.getPhone()).toString().equals(customerPlace.getCode())){
|
||||
int result = customerPlaceService.insertCustomerPlace(customerPlace);
|
||||
if(result > 0){
|
||||
Customer params = new Customer();
|
||||
params.setCustomerId(customerPlace.getCustomerId());
|
||||
params.setPlaceStatus(PlaceStatus.PLACE_APPLYING.getCode());
|
||||
int updateStatusResult = customerService.updateCustomer(params);
|
||||
if(result > 0 && updateStatusResult > 0){
|
||||
CacheUtils.remove(customerPlace.getPhone());
|
||||
return AjaxResult.success("分销申请成功!");
|
||||
}else {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
package com.ghy.common.enums;
|
||||
|
||||
/**
|
||||
* 分销审核状态
|
||||
*
|
||||
* @author ydq
|
||||
* @date : 2022-08-12 21:40
|
||||
*/
|
||||
public enum PlaceStatus {
|
||||
NO_PLACE(0, "未提交分销资格审核"),
|
||||
PLACE_APPLYING(1, "分销资格审核中"),
|
||||
CAN_PLACE(2, "分销资格审核通过");
|
||||
|
||||
private Integer code;
|
||||
private String desc;
|
||||
|
||||
PlaceStatus(Integer code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
}
|
||||
|
|
@ -33,6 +33,9 @@
|
|||
<if test="openId != null and openId != ''">
|
||||
AND open_id = #{openId}
|
||||
</if>
|
||||
<if test="customerPlace != null and customerPlace != ''">
|
||||
AND customer_place = #{customerPlace}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue