提交修改
This commit is contained in:
parent
c9db550e68
commit
1cdb82beef
@ -13,7 +13,7 @@ import java.util.Arrays;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class TaskCommand {
|
public class TaskCommandUtils {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ public class ThirdTaskController {
|
|||||||
a = a.replaceAll("\\\\u0000", ""); //替换掉前面的空格
|
a = a.replaceAll("\\\\u0000", ""); //替换掉前面的空格
|
||||||
log.info("替换空格之后的命令:" + a);
|
log.info("替换空格之后的命令:" + a);
|
||||||
commandDto = JSONObject.parseObject(a, CommandDto.class);
|
commandDto = JSONObject.parseObject(a, CommandDto.class);
|
||||||
String[] tokens = TaskCommand.parse(commandDto.getCommand());
|
String[] tokens = TaskCommandUtils.parse(commandDto.getCommand());
|
||||||
log.info("parse data :" + Arrays.toString(tokens));
|
log.info("parse data :" + Arrays.toString(tokens));
|
||||||
Object object = null;
|
Object object = null;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -33,7 +33,7 @@ public interface TaskRespMapper extends BaseMapper<TaskResp> {
|
|||||||
int deleteTaskRespById(@Param("id") Long id);
|
int deleteTaskRespById(@Param("id") Long id);
|
||||||
|
|
||||||
|
|
||||||
void deleteTaskRespByUserId(@Param("userId") Long userId);
|
void deleteTaskRespByUserId(@Param("userId") Long userId, @Param("command") String command);
|
||||||
|
|
||||||
TaskResp selectTaskRespByUserIdIndex(@Param("userId") Long userId, @Param("index") Long index, @Param("command") String command);
|
TaskResp selectTaskRespByUserIdIndex(@Param("userId") Long userId, @Param("index") Long index, @Param("command") String command);
|
||||||
|
|
||||||
|
|||||||
@ -66,7 +66,7 @@ public class TaskRespServiceImpl extends ServiceImpl<TaskRespMapper, TaskResp> i
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteInsertLastResult(SysUserEntity user,List<ResultDto> list,String command) {
|
public void deleteInsertLastResult(SysUserEntity user,List<ResultDto> list,String command) {
|
||||||
taskRespMapper.deleteTaskRespByUserId(user.getUserId());
|
taskRespMapper.deleteTaskRespByUserId(user.getUserId(),command);
|
||||||
List<TaskResp> taskRespList =new ArrayList<>();
|
List<TaskResp> taskRespList =new ArrayList<>();
|
||||||
for(ResultDto resultDto : list){
|
for(ResultDto resultDto : list){
|
||||||
TaskResp taskResp = new TaskResp();
|
TaskResp taskResp = new TaskResp();
|
||||||
|
|||||||
@ -117,9 +117,8 @@
|
|||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<delete id="deleteTaskRespByUserId">
|
<delete id="deleteTaskRespByUserId">
|
||||||
delete from lz_task_resp where user_id = #{userId}
|
delete from lz_task_resp where user_id = #{userId} and command = #{command}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="selectTaskRespByUserIdIndex" resultType="com.lz.modules.third.entity.TaskResp">
|
<select id="selectTaskRespByUserIdIndex" resultType="com.lz.modules.third.entity.TaskResp">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user