| | |
| | | package cn.exrick.xboot.your.controller; |
| | | |
| | | import cn.exrick.xboot.core.common.constant.SettingConstant; |
| | | import cn.exrick.xboot.core.common.utils.CommonUtil; |
| | | import cn.exrick.xboot.core.common.utils.PageUtil; |
| | | import cn.exrick.xboot.core.common.utils.ResultUtil; |
| | | import cn.exrick.xboot.core.common.vo.PageVo; |
| | | import cn.exrick.xboot.core.common.vo.Result; |
| | | import cn.exrick.xboot.core.entity.Setting; |
| | | import cn.exrick.xboot.core.entity.User; |
| | | import cn.exrick.xboot.core.service.SettingService; |
| | | import cn.exrick.xboot.core.service.UserService; |
| | | import cn.exrick.xboot.your.entity.Customer; |
| | | import cn.exrick.xboot.your.entity.CustomerReceive; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.InputStream; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | QueryWrapper<Fingerprint> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("code",code); |
| | | wrapper.eq("area_id",c.getAreaId()); |
| | | wrapper.eq("customer_id",customerId); |
| | | Fingerprint one = iFingerprintService.getOne(wrapper); |
| | | if(one==null){ |
| | | return ResultUtil.error("指纹与商户不匹配"); |
| | | } |
| | | |
| | | CustomerReceive customerReceive = iCustomerReceiveService.getById(one.getCustomerReceiveId()); |
| | | return new ResultUtil<Object>().setData(customerReceive); |
| | |
| | | User user = userService.get(fingerprint.getUserId()); |
| | | fingerprint.setUsername(user.getUsername()); |
| | | fingerprint.setPassword(user.getDescription()); |
| | | fingerprint.setType(user.getType2()); |
| | | } |
| | | if(StrUtil.isNotEmpty(fingerprint.getCustomerId())){ |
| | | Customer byId = iCustomerService.getById(fingerprint.getCustomerId()); |
| | | fingerprint.setAreaId(byId.getAreaId()); |
| | | } |
| | | |
| | | if(StrUtil.isNotEmpty(fingerprint.getCustomerReceiveId())){ |
| | | CustomerReceive byId = iCustomerReceiveService.getById(fingerprint.getCustomerReceiveId()); |
| | | byId.setFstatus(1); |
| | | iCustomerReceiveService.saveOrUpdate(byId); |
| | | } |
| | | if (iFingerprintService.saveOrUpdate(fingerprint)) { |
| | | return new ResultUtil<Fingerprint>().setData(fingerprint); |