|
|
|
@ -35,6 +35,7 @@ import com.shxy.xymanager_dao.dao.TerminalPhotoDao;
|
|
|
|
|
import com.shxy.xymanager_dao.dao.TerminalsDao;
|
|
|
|
|
import com.shxy.xymanager_service.service.TerminalPhotoService;
|
|
|
|
|
import com.shxy.xymanager_service.service.TerminalScheduleRuleService;
|
|
|
|
|
import io.swagger.models.auth.In;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
@ -405,13 +406,13 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ServiceBody<String> addOrUpdatePhotoParams(PhotoParamsVo vo) {
|
|
|
|
|
public ServiceBody<Integer> addOrUpdatePhotoParams(PhotoParamsVo vo) {
|
|
|
|
|
Integer result = terminalPhotoDao.updateOrInsertParams(vo);
|
|
|
|
|
if (result>0) {
|
|
|
|
|
String cmd = "/usr/local/bin/xympadmn --server=127.0.0.1 --port=6891 --act=imgparams --cmdid=" + vo.getCmdId() + "\t" + "--color=" + vo.getColor() + "\t" + "--resolution=" + vo.getResolution() + "\t"
|
|
|
|
|
+ "--luminance=" + vo.getLuminance() + "\t" + "-contrast=" + vo.getContrast() + "\t" + "--saturation=" + vo.getSaturation();
|
|
|
|
|
String cmd = "/usr/local/bin/xympadmn --server=127.0.0.1 --port=6891 --act=imgparams --clientid=10 --cmdid=" + vo.getCmdId() + "\t" + "--color=" + vo.getColor() + "\t" + "--resolution=" + vo.getResolution() + "\t"
|
|
|
|
|
+ "--luminance=" + vo.getLuminance() + "\t" + "-contrast=" + vo.getContrast() + "\t" + "--saturation=" + vo.getSaturation()+ "\t" + "--reqid=" + Constants.REQUEST_ID;
|
|
|
|
|
ProcessExecUtils.exec(cmd);
|
|
|
|
|
return Asserts.success("更新成功");
|
|
|
|
|
return Asserts.success(Constants.REQUEST_ID.addAndGet(1));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return Asserts.error("更新失败");
|
|
|
|
|