Merge branch 'master' of https://e.coding.net/g-cphe0354/shouyinjixitong/cashier-client
This commit is contained in:
commit
7e12def5c1
|
|
@ -11,6 +11,7 @@ import com.chaozhanggui.system.cashierservice.util.JSONUtil;
|
|||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -59,6 +60,7 @@ public class TbPrintPCMachineService {
|
|||
*/
|
||||
public Result queryByPage(TbPrintPCMachine tbPrintMachine) {
|
||||
PageHelper.startPage(tbPrintMachine.getPage(), tbPrintMachine.getPageSize());
|
||||
tbPrintMachine.setContentType("local");
|
||||
List<TbPrintPCMachine> tbPrintMachines = this.tbPrintMachineMapper.queryAll(tbPrintMachine);
|
||||
PageInfo pageInfo=new PageInfo(tbPrintMachines);
|
||||
return Result.success(CodeEnum.SUCCESS,pageInfo);
|
||||
|
|
@ -73,7 +75,11 @@ public class TbPrintPCMachineService {
|
|||
public Result insert(PrintMachineDto resources) {
|
||||
TbPrintPCMachine tbPrintMachine = new TbPrintPCMachine();
|
||||
tbPrintMachine.setCreatedAt(Instant.now().toEpochMilli());
|
||||
tbPrintMachine.setContentType("local");
|
||||
if (resources.getConfig() != null){
|
||||
if(CollectionUtils.isEmpty(resources.getConfig().getCategoryList())){
|
||||
resources.getConfig().setCategoryList(null);
|
||||
}
|
||||
tbPrintMachine.setConfig(JSONUtil.toJSONString(resources.getConfig(),true));
|
||||
}
|
||||
BeanUtils.copyProperties(resources,tbPrintMachine);
|
||||
|
|
|
|||
Loading…
Reference in New Issue