修改交班
This commit is contained in:
parent
8a0589e384
commit
8a51ed732e
|
|
@ -21,6 +21,8 @@ import org.springframework.stereotype.Service;
|
|||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
|
||||
import static com.chaozhanggui.system.cashierservice.sign.CodeEnum.USERNOLOGIN;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class DataService {
|
||||
|
|
@ -49,6 +51,9 @@ public class DataService {
|
|||
@Autowired
|
||||
tbHandoverMapper tbHandoverMapper;
|
||||
|
||||
@Autowired
|
||||
TbTokenMapper tbTokenMapper;
|
||||
|
||||
|
||||
public Result handoverprintData(String token, Integer id){
|
||||
|
||||
|
|
@ -56,6 +61,15 @@ public class DataService {
|
|||
JSONObject info= TokenUtil.parseParamFromToken(token);
|
||||
MsgException.checkNull(info,"获取信息失败");
|
||||
|
||||
|
||||
TbToken tbToken = tbTokenMapper.selectByToken(token);
|
||||
|
||||
if (ObjectUtil.isEmpty(tbToken)) {
|
||||
return Result.fail(USERNOLOGIN);
|
||||
}
|
||||
|
||||
|
||||
|
||||
TbmerchantAccount tbmerchantAccount= tbmerchantAccountMapper.selectByPrimaryKey(Integer.valueOf(info.get("accountId").toString()));
|
||||
MsgException.checkNull(tbmerchantAccount,"商户信息不存在");
|
||||
|
||||
|
|
@ -123,7 +137,7 @@ public class DataService {
|
|||
return Result.success(CodeEnum.SUCCESS,handoverInfo);
|
||||
}else{
|
||||
HandoverInfo handoverInfo=new HandoverInfo(tbShopInfo.getShopName(),
|
||||
ObjectUtil.isNotEmpty(shopUserDuty.getLoginTime())? DateUtils.getTime(shopUserDuty.getLoginTime()):null,
|
||||
ObjectUtil.isNotEmpty(tbToken.getCreateTime())? DateUtils.getTime(tbToken.getCreateTime()):null,
|
||||
DateUtils.getTime(new Date()),
|
||||
ObjectUtil.isNull(shopStaff.getName())?"":shopStaff.getName(),
|
||||
null,null,"0",
|
||||
|
|
|
|||
Loading…
Reference in New Issue