中扬CRM客户关系管理系统
#
lsh
2024-04-15 57cd76d861e0102a9dee9fa56a0bf4110e8c3f55
src/main/java/com/zy/crm/manager/controller/CstmrTypeController.java
@@ -10,7 +10,9 @@
import com.core.common.DateUtils;
import com.core.common.R;
import com.zy.crm.common.web.BaseController;
import com.zy.crm.manager.entity.CstmrGrade;
import com.zy.crm.manager.entity.CstmrType;
import com.zy.crm.manager.service.CstmrGradeService;
import com.zy.crm.manager.service.CstmrTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -40,6 +42,7 @@
        EntityWrapper<CstmrType> wrapper = new EntityWrapper<>();
        excludeTrash(param);
        convert(param, wrapper);
        hostEq(wrapper);
        allLike(CstmrType.class, param.keySet(), wrapper, condition);
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
        return R.ok(cstmrTypeService.selectPage(new Page<>(curr, limit), wrapper));
@@ -59,8 +62,9 @@
    }
    @RequestMapping(value = "/cstmrType/add/auth")
    @ManagerAuth
    @ManagerAuth(memo = "添加客户类别")
    public R add(CstmrType cstmrType) {
        cstmrType.setHostId(getHostId());
        cstmrType.setCreateBy(getUserId());
        cstmrType.setCreateTime(new Date());
        cstmrType.setUpdateBy(getUserId());
@@ -71,7 +75,7 @@
    }
   @RequestMapping(value = "/cstmrType/update/auth")
   @ManagerAuth
   @ManagerAuth(memo = "更新客户类别")
    public R update(CstmrType cstmrType){
        if (Cools.isEmpty(cstmrType) || null==cstmrType.getId()){
            return R.error();
@@ -83,7 +87,7 @@
    }
    @RequestMapping(value = "/cstmrType/delete/auth")
    @ManagerAuth
    @ManagerAuth(memo = "删除客户类别")
    public R delete(@RequestParam(value="ids[]") Long[] ids){
         for (Long id : ids){
            cstmrTypeService.deleteById(id);
@@ -104,7 +108,7 @@
    @RequestMapping(value = "/cstmrTypeQuery/auth")
    @ManagerAuth
    public R query(String condition) {
    public R queryType(String condition) {
        EntityWrapper<CstmrType> wrapper = new EntityWrapper<>();
        wrapper.like("id", condition);
        Page<CstmrType> page = cstmrTypeService.selectPage(new Page<>(0, 10), wrapper);